%: 长和宽对应的百分比比列 进行圆角设定,举个例子
.box{
width:300px;
height:100px;
border-radius:30%;;//宽:300*0.3 = 90px 高:100*0.3 =30px
}
<div class="box"></div>

21C4BB5E-057E-4549-93BB-7BE0F651DBCE.png
注意:如上图,当长宽不相等时,圆角也不一样
.box{
width:300px;
height:100px;
border-radius:30%;;//宽:300*0.3 = 90px 高:100*0.3 =30px
}
<div class="box"></div>
注意:如上图,当长宽不相等时,圆角也不一样