相关疑难解决方法(0)

Bootstrap 4行填充剩余高度

我正在努力使一排伸展以填补剩余的可用高度.我尝试添加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>
Run Code Online (Sandbox Code Playgroud)

codepen:https://codepen.io/ee92/pen/zjpjXW/ edit = 1100

在此输入图像描述

我想让蓝色行(ROW 2)填满所有红色空间.有什么建议?

谢谢

html css grid row bootstrap-4

15
推荐指数
2
解决办法
2万
查看次数

标签 统计

bootstrap-4 ×1

css ×1

grid ×1

html ×1

row ×1