我正在努力让一行充满剩余的可用高度。我尝试在行类中添加h-100
,但这会在屏幕底部留下空白。肯定有方法可以实现,但我完全被卡住了。以下是我的代码:
<div class="container-fluid h-100">
<div class="row justify-content-center h-100">
<div class="col-4 bg-red">
<div class="h-100">
<div class="row justify-content-center bg-purple">
<div class="text-white">
<div style="height:200px">ROW 1</div>
</div>
</div>
<div class="row justify-content-center bg-blue">
<div class="text-white">ROW 2</div>
</div>
</div>
</div>
<div class="col-8 bg-gray"></div>
</div>
</div>
CodePen: https://codepen.io/ee92/pen/zjpjXW/?editors=1100
我想让蓝色行(第二行)填满所有红色空间。有什么建议吗?
谢谢。
m1l05z
也想要同样的效果。也许这不是解决我的问题的最佳方法,但这是我找到的方法 =)。 - Nate