【发布时间】:2018-07-31 01:53:46
【问题描述】:
我有一张这样的桌子:
<table class="table table-hover">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col" class="d-none d-sm-block">First</th>
<th scope="col" class="d-none d-sm-block">Last</th>
<th scope="col" class="d-none d-sm-block">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
当使用d-none d-sm-block(在小屏幕上隐藏元素)时,我的整个表格都坏了,我试图隐藏的三个单元格只是相互堆叠。
是我做错了什么,还是这是 BS4 中的错误?
这是一支可以查看的笔:
【问题讨论】: