border-radius:10px;
指的是四个角都是半径为10px的圆角
border-radius:10px 20px 30px 40px;
指的是左上,右上,右下,左下的圆角半径
border-radius:50%;
指的是半径在水平方向占比和垂直方向占比都是50%,其包括padding和border
在长宽不等的元素时
border-radius:200px/350px;
水平方向上半径是200px,垂直方向上的半径是350px
例如:
div{
width: 200px;
height: 300px;
background: red;
margin:200px 500px;
/*border-radius:300px/200px;*/ /*水平方向上的半径300px,垂直方向上的半径为200*/
border-top:50px solid black;
border-radius:200px/350px; /*水平方向上的半径200px比上垂直方向上的半径为350px,
因为存在上边框所以要加上等同于50%*/
/*border-top-right-radius: 180px 350px;*/ /*右上角的水平半径和垂直半径*/
}