我有一排像这样的缩略图:
我希望他们的身高相等.这是我的代码:
<div class="row text-center"> <div class="col-md-3 col-sm-6"> <div class="thumbnail"> <div class="caption"> <h3>HOTKEY + COMBO</h3> <p>Hotkey description goes here. Category only shown in explore.</p> <p> <a href="#" class="btn btn-default" data-tooltip="Change Hotkey"> </p> </div> </div> </div> <div class="col-md-3 col-sm-6"> <div class="thumbnail"> <div class="caption"> <h3>HOTKEY + COMBO</h3> <p>short desc</p> <p> <a href="#" class="btn btn-default" data-tooltip="Change Hotkey"> </p> </div> </div> </div> <div class="col-md-3 col-sm-6 hotkey-add"> <div class="thumbnail"> <div class="caption"> <p></p> <p><a href="#" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span></a></p> </div> </div> </div> </div>
这可能吗?就像我们在bootstrap4中看到的,这里是相同的高度卡:
解决方法
似乎bootstrap 4,就像你在示例中所示,用于获得相同的高度,display:table表示容器div和display:table-cell表示内部的.
其他解决方案可以使用< table>而是< div>,使用flex属性…
结帐这个How can I make Bootstrap columns all the same height?