This question already has answers here:
How can I make Bootstrap columns all the same height?
(33个答案)
三年前关闭。
我想把所有的柱子排成同一行。因此,一行中的所有列的高度应与具有最大高度的任何列的高度相同。
小提琴手:https://jsfiddle.net/ebwwvy6m/11/
<div class="container-fluid">
  <div class="row">
    <div class="col-sm-2 bg-warning">
      This is a col-sm-2
      Some test content
       Some test content
        Some test content
         Some test content
    </div>
    <div class="col-sm-6 bg-success">
      .col-sm-6
    </div>
    <div class="col-sm-4 bg-info">
      .col-sm-4
      Some test content
      Some test content
    </div>
  </div>
</div>

问题:
html - twitter bootstrap-根据最大列高设置列高-LMLPHP
第2列和第3列都应展开以具有与第1列相同的高度。
任何帮助/建议将不胜感激。

最佳答案

.row-eq-height{
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

将此类与行类一起添加。
<div class="container-fluid">
  <div class="row-eq-height row">
    <div class="col-sm-2 bg-warning">
      This is a col-sm-2
      Some test content
       Some test content
        Some test content
         Some test content
    </div>
    <div class="col-sm-6 bg-success">
      .col-sm-6
    </div>
    <div class="col-sm-4 bg-info">
      .col-sm-4
      Some test content
      Some test content
    </div>
  </div>
</div>

https://jsfiddle.net/ebwwvy6m/16/

08-26 16:13