我正在尝试使用一个引导流体行作为一个显示表,这样我就可以使孩子从上到下的中间。
注意:我将不知道行的高度或跨度的高度,并且不想使用JavaScript。
下面是html:
<div class="container-fluid">
<div class="row-fluid vCenterParent">
<div class="span6 left-style vCenterChild">
<div>Left Side</div>
<div>Left Side</div>
<div>Left Side</div>
<div>Left Side</div>
</div>
<div class="span6 right-style vCenterChild">
<div>Right Side</div>
</div>
</div>
</div>下面是CSS:
.left-style {
background-color: green;
}
.right-style {
background-color: blue;
}
.vCenterParent {
display: table !important;
}
.vCenterChild {
display: table-cell !important;
vertical-align: middle;
}这是JSFiddle:http://jsfiddle.net/rsparrow/q2Ted/
(注意:运行演示的浏览器窗口需要至少750 in,以防止响应性设计启动)
我想把绿色和蓝色的盒子从上到下放在行的中央。
现在看起来是这样的:

我想让它看起来像这样

https://stackoverflow.com/questions/19416472
复制相似问题