3 回答
TA贡献1891条经验 获得超3个赞
像素是最差的单位, 如果您希望文本适合最小的圆圈,则
可以使用,您可以分别为它们分配更大的值vh
body{
background-color:blue;
}
#first-circle {
border-radius: 50%;
width: 90vh;
height: 90vh;
border: 1px solid #FFFFFF;
position: absolute;
top:28px;
border: 1px solid rgba(255, 255, 255);
left: 50%;
transform: translate(-50%,0) , scale(2);
}
#second-circle {
position: absolute;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255);
width: 70vh;
height: 70vh;
top: 10vh;
left: 10vh;
}
#third-circle {
position: absolute;
width: 50vh;
height: 50vh;
top: 10vh;
left: 10vh;
border: 1px solid rgba(255, 255, 255);
box-sizing: border-box;
border-radius: 50%;
}
#fourth-circle {
position: absolute;
width: 30vh;
height: 30vh;
top: 10vh;
left: 10vh;
border: 1px solid rgba(255, 255, 255);
box-sizing: border-box;
border-radius: 50%;
}
#fifth-circle {
position: absolute;
font-size:14px;
width: 10vh;
height: 10vh;
top: 10vh;
left: 10vh;
text-align: center;
color:#fff;
border: 1px solid rgba(255, 255, 255,.8);
box-sizing: border-box;
border-radius: 50%;
}
.text-container{
margin-top:0px;
font-size: 1em;
}
<div id="first-circle">
<div id="second-circle" >
<div id="third-circle" >
<div id="fourth-circle">
<div id="fifth-circle">
<div class="text-container">
</div>
</div>
</div>
</div>
</div>
</div>
- 3 回答
- 0 关注
- 149 浏览
添加回答
举报