引导程序跨度中的垂直对齐 [英] Vertical alignment in bootstrap's spans
本文介绍了引导程序跨度中的垂直对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何解决方法可以使 bootstrap 跨度中的元素或文本相对于其他跨度垂直对齐
例如.如果我有这样的一行和跨度
<div class="span3" style="background-color:lightblue">描述</div><div class="span9" style="background-color:pink">Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum ....
看起来像这样
那么有没有办法在下一个跨度高度的垂直中心显示描述"?
解决方案
尝试 display: table;
为父级和 display: table-cell;
为子级
Is there any work around for vertical alignment of elements or texts in bootstrap spans relative to other spans
For eg. if I have a row and spans like this
<div class="row-fluid">
<div class="span3" style="background-color:lightblue">Description</div>
<div class="span9" style="background-color:pink">
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum ....
</div>
</div>
It looks like this
So is there a way to show "Description" vertically center of the next span's height?
解决方案
try display: table;
for parent and display: table-cell;
for child
这篇关于引导程序跨度中的垂直对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文