是否可以在 bootstrap v4 的 strip 表中使用边距分隔每一行。我希望每行间隔一点以便更具可读性。
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</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>
最佳答案
表格行没有边距值。您可以考虑对 td
使用填充值。
供引用:
.table td{
padding-bottom: 10px;
}
关于css - 是否可以在 bootstrap V4 strip 表中的每一行之间添加边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40791394/