我有绝对定位的内圆,并且我成功地将它们居中,如下所示。最小的圆内也有文本居中。
https://i.stack.imgur.com/5lHKK.png
问题是当我想让它响应时,这也会减少宽度。滚动条发生了我不想要的情况,并显示为红色标签。我希望在减少宽度时从左侧和右侧裁剪我的圆圈。我怎样才能做到这一点?
https://i.stack.imgur.com/JPJHG.png
body{
background-color:blue;
}
#first-circle {
border-radius: 50%;
width: 643px;
height: 643px;
border: 1px solid #FFFFFF;
position: absolute;
top:28px;
border: 1px solid rgba(255, 255, 255);
left: 50%;
transform: translate(-50%,0);
}
#second-circle {
position: absolute;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255);
width: 508px;
height: 508px;
top: 50%;
left: 50%;
margin: -254px 0px 0px -254px;
}
#third-circle {
position: absolute;
width: 382px;
height: 382px;
border: 1px solid rgba(255, 255, 255);
box-sizing: border-box;
border-radius: 50%;
top: 50%;
left: 50%;
margin: -191px 0px 0px -191px;
}
#fourth-circle {
position: absolute;
width: 254px;
height: 254px;
border: 1px solid rgba(255, 255, 255);
box-sizing: border-box;
border-radius: 50%;
top: 50%;
left: 50%;
margin: -127px 0px 0px -127px;
}
#fifth-circle {
position: absolute;
font-size:14px;
width: 128px;
height: 128px;
text-align: center;
color:#fff;
border: 1px solid rgba(255, 255, 255,.8);
box-sizing: border-box;
border-radius: 50%;
top: 50%;
left: 50%;
margin: -64px 0px 0px -64px;
}
12345678_0001
万千封印
眼眸繁星
相关分类