【发布时间】:2017-11-17 16:59:07
【问题描述】:
我有这个 bootstrap 4 网格,其中一行高度为 200 像素,两列:
<div class="row" style="height:200px;background-color:grey">
<div class="col-md-10">
<span>How to center this vertically/horizontally</span>
</div>
<div class="col-md-2">
<span>This too</span>
</div>
</div>
我不确定如何将两列中的文本垂直和水平居中。
这是一个小提琴:http://jsfiddle.net/x1hphsvb/31/
我在 stackoverflow 上查看了类似的问题/答案,但我找不到对我的案例实际有效的答案。
那该怎么做呢?
【问题讨论】:
标签: html css twitter-bootstrap bootstrap-4