是的same column height is native support
在bootstrap 4
中,因为引导程序4使用flex box
。
您可以轻松地达到同样的行为,如果你使用柔性的引导3通过使用下面的example--
img {
border-radius: 50%;
}
.bord {
border-style: solid;
}
.row-eq-height {
display: flex;
}
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<div class="container">
<div class="row row-eq-height">
<div class="col-sm-3 text-center bord">
<img src="http://placehold.it/140x140" class="center-block" />
</div>
<div class="col-sm-6 text-center bord">
<p>Some text</p>
</div>
<div class="col-sm-3 text-center bord">
<img src="http://placehold.it/140x140" class="center-block" />
</div>
</div>
</div>
注意
正如@ZimSystems提到display: flex;
适用于全高度,但会打破Bootstrap 3行和列的响应行为。
Learn about flexbox here
Learn about the above example of .row-eq-height here
希望这有助于清除您的理解!
'display:flex;'适用于全高,但它打破了Bootstrap 3行和列的响应行为 – ZimSystem
我知道这一点..我只是试图解释它是如何实现的......我在添加您的建议到答案。感谢您的洞察力。 – neophyte