【发布时间】:2018-08-19 22:17:21
【问题描述】:
我在这里有一个 Bootply:http://www.bootply.com/XLGE6Vpjov
我需要在容器中居中的 3 个圆圈,然后我需要将里面的文本水平和垂直居中。
如何使文本垂直居中?
我知道border-radius 在 IE8 中不起作用,但我不介意它是一个正方形。
<div class="container">
<div class="row">
<div class="col-md-4 block text-center">
<p class="circle">Some Text here Some text here Some text here Some text here</p>
</div>
<div class="col-md-4 block">
<p class="circle">Some Text here</p>
</div>
<div class="col-md-4 block">
<p class="circle">Some More Text here</p>
</div>
</div>
</div>
.block{
border: 1px solid red;
text-align: center;
vertical-align: middle;
}
.circle{
background: red;
border-radius: 200px;
color: white;
height: 200px;
font-weight: bold;
width: 200px;
}
【问题讨论】:
标签: html css twitter-bootstrap-3