我用下面的html用bootstrap 4构建了一个网格。
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="row">
<div class="col-sm-12 col-md-3">
<div class="row">
<div class="col-lg-12">
here are different heights possible
</div>
</div>
<div class="row align-items-end">
<div class="col-lg-12 date">
should always be at bottom (like the fourth date)
</div>
</div>
</div>
<div class="col-sm-12 col-md-3">
<div class="row">
<div class="col-lg-12">
here are different heights possible
</div>
</div>
<div class="row align-items-end">
<div class="col-lg-12 date">
should always be at bottom (like the fourth date)
</div>
</div>
</div>
<div class="col-sm-12 col-md-3">
<div class="row">
<div class="col-lg-12">
here are different heights possible
here are different heights possible
here are different heights possible
</div>
</div>
<div class="row align-items-end">
<div class="col-lg-12 date">
should always be at bottom (like the fourth date)
</div>
</div>
</div>
</div>
我希望日期总是在第二行的底部。也许图片更好地解释了这个问题。前三个日期与弹性框底部的第四个日期不在同一行中:
https://stackoverflow.com/questions/54985467
复制相似问题