css - 是否可以在 bootstrap V4 strip 表中的每一行之间添加边距

标签 css twitter-bootstrap html-table margin

是否可以在 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/

相关文章:

javascript - 手机长按增加位置

twitter-bootstrap - Bootstrap 和导航栏崩溃不起作用 react (创建 react 应用程序)

css - Outlook 中的表格宽度过大

html - 副标题宽度未按需要在 HTML 表格中设置,表格布局为 :fixed

CSS 宽度和最大宽度组合

HTML/CSS -lineheight 正在影响 <br> 标签?

html - 网站水平跳转

css - 编辑 <li> 的 innerhtml 以添加带有图标图像的 <i> 标签

javascript - 使用 jquery 填充模态表单

css - bootstrap 3 内置图像替换?