HTML Dog
跳至导航

CSS 属性:border-top-right-radius

圆角右上角。

指定一个四分之一圆或椭圆的半径,该四分之一圆或椭圆构成框的边框区域外边缘的右上角。它是一个通用的角部圆角属性,即使没有边框也能生效。

右上角被切割成一个指定半径的圆(或椭圆)的右上四分之一部分。

可能的值

注意示例
[length]圆的半径。1em
[percentage]椭圆的半径。水平半径是边框框宽度的百分比。垂直半径是边框框高度的百分比。50%
[值] [值]椭圆的半径。第一个值是水平半径。第二个值是垂直半径。10px 20px
inherit
initial
unset

示例


.box1 { border-top-right-radius: 10px; }
/* Top-right corner has rounding made from a circle with a radius of 10 pixels. */

.box2 { border-top-right-radius: 10px 20px; }
/* Top-right corner has rounding made from an ellipse with a horizontal radius of 10 pixels and vertical radius of 20 pixels. */

浏览器支持

我可以使用 border-radius 吗? 来自 caniuse.com 的关于 border-radius 特性在主流浏览器支持情况的数据。