【发布时间】:2016-11-24 22:32:58
【问题描述】:
我想将圆形下方的文本对齐,完全在中间。
这里是一个 sn-p(我简化了所有内容,因为圆形和文本是由 angular 处理的,所以它们是我的屏幕截图和 sn-p 之间的一些区别)
.circle2 {
border-radius: 50%;
width: 18px;
height: 18px;
background: RoyalBlue;
display: inline-block;
z-index: 2;
}
.wrapper2 {
display:flex;
width:100%;
justify-content: space-around;
position:relative;
}
.wrapper2:after {
position:absolute;
content:'';
display:block;
width: 100%;
top:7px;
height: 3px;
background: RoyalBlue;
}
.advanced2 {
width: 18px;
height: 18px;
}
.circleActive2 {
border-radius: 50%;
width: 25px;
height: 25px;
background: RoyalBlue;
display: inline-block;
}
<div class="w3-container">
<div class="wrapper2">
<span>
<span><div class="circle2 advanced2" ></div>test</span>
<span><div class="circle2 advanced2 circleActive2" ></div>test2</span>
<span><div class="circle2 advanced2" ></div>test3</span>
<span><div class="circle2 advanced2" ></div>test4</span>
<span><div class="circle2 advanced2" ></div>test5</span>
</span>
</div>
</div>
【问题讨论】:
标签: css alignment geometry text-align