我在移动 View 中尝试以下代码无法修复移动 View 中的表格重排问题。任何建议都会得到真正的应用
查看代码 CODEPEN
<div class="container">
<div class="row">
<div class="col-sm-12">
<table class="table table-reflow">
<thead>
<tr>
<th>Id</th>
<th>Employee Name</th>
<th>Salary</th>
<th>Bonus</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr scope="row">
<td>665</td>
<td>Amit Shah</td>
<td>10000</td>
<td>1000</td>
<td>11000</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
最佳答案
我有使用媒体查询的解决方案。希望它可以帮助你。 检查 CODEPLY链接
CSS:
@media (max-width: 544px) {
.table-reflow thead,
.table-reflow thead tr,
.table-reflow tbody tr {
width: 100%;
}
}
关于html - Bootstrap v4.0.0-alpha.3 移动 View 中的表回流问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39169317/