提问者:小点点

如何使一个边框在css中循环[复制]


如何在css中使边框变成圆形,目前它是方形的,所以我想使它变成圆形

    color: white;
    left: 52px;
    position: absolute;
    top: 65px;
    padding: 3px;
    background-color: rgb(0, 195, 255);
   
    font-size: 12px;
}

查看示例图像


共3个答案

匿名用户

将宽度和高度设置为相等的值,并添加,边框半径: 50%;

.circle {
width: 60px;
height:60px;
border-radius: 50%;
background-color: #bada55;
}
<div class="circle"></div>

匿名用户

您可以使用边界半径:20px将20px更改为更高或更低的曲线,

匿名用户

添加边界半径:50%在css中。