如何在css中使边框变成圆形,目前它是方形的,所以我想使它变成圆形
color: white;
left: 52px;
position: absolute;
top: 65px;
padding: 3px;
background-color: rgb(0, 195, 255);
font-size: 12px;
}
查看示例图像
将宽度和高度设置为相等的值,并添加,边框半径: 50%;
。
.circle {
width: 60px;
height:60px;
border-radius: 50%;
background-color: #bada55;
}
<div class="circle"></div>
您可以使用边界半径:20px
将20px更改为更高或更低的曲线,
添加边界半径:50%代码>在css中。