html - Bootstrap 列不会填充剩余高度
问题描述
我的内容只有几行长,但我希望页面继续保持剩余的高度。
<div style="background: #e0e0e0;">
<main role="main" class="container">
<div class="row" style="background: #f9f9f9;">
<div class="col mb-3">
<h1 class="display-4 mt-5">{{object.name}}</h1>
<p>City: New York</p>
<div class="row mt-5">
<table class="table">
<thead>
<tr>
<th scope="col">Year</th>
<th scope="col">Show</th>
</tr>
</thead>
<tbody>
{% for show in shows %}
<tr>
<th scope="row">2019</th>
<td>Test Title</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</main>
</div>
解决方案
尝试在 Css min-height: 100vh 中指定<main>
标签和 <div style="background: #e0e0e0;"></div>
标签
推荐阅读
- c# - 使用 iTextSharp 将 PDF 中的图形/矢量绘图插入不同的 PDF
- java - 如何在 Service 中读取数据并监听 Room 数据库的变化?
- git - Git 推送到旧仓库
- python - 结合列表字典的数据聚合
- ios - 如何防止大标题折叠
- javascript - 即使转换为度数,Math.sin 也不正确的结果
- c# - Square Connect API - 发票未显示
- angular - 我的 ngrx 减速器只收到一个 `@ngrx/store/init` 动作
- c# - 如何使用来自另一个 lambda 表达式的返回值创建 lambda 表达式?
- javafx - JavafX - 动态 ImageView 设置默认大小