border-radio 可以控制一个元素的四个角如何切圆 接收四个值 分别设置 左上 右上 右下 左下
代码:
.box{
width: 150px;
height: 150px;
background-color: rgb(0, 0, 0);
border-radius:10px 20px 30px 40px;
}
效果:
通过控制四个角的切角弧度可以创造出一个扇形
代码:
.box{
width: 150px;
height: 150px;
background-color: rgb(0, 0, 0);
border-radius:150px 0px 0px 0px;
}
效果:
border边框也是在且圆范围之内的 所以设置一个border 然后在将背景颜色设置成透明即可的到一个圆弧
代码:
.box{
width: 150px;
height: 150px;
border: 10px solid;
border-right:none ;
border-bottom: none;
background-color: rgba(0, 0, 0, 0);
border-radius:160px 0px 0px 0px;
}
效果:
设置成圆环
代码:
.box{
width: 150px;
height: 150px;
border: 10px solid;
background-color: rgba(0, 0, 0, 0);
border-radius:50%;
}
效果:
原创©本文章为李家霖原创,未经许可,禁止转载
0条评论