HTML Dog
跳至导航

CSS 属性: border-top-left-radius

圆角左上角。

指定一个四分之一圆或椭圆的半径,该半径形成框的边框区域外边缘的左上角。它是一个通用的角落圆角属性,实际上不需要边框即可生效。

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

可能的值

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

示例


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

.box2 { border-top-left-radius: 10px 20px; }
/* Top-left 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 特性在主流浏览器支持情况的数据。