css - 设置表格行之间线条的粗细

标签 css css-tables

如何更改两个表格行之间的线条粗细 例如:

Imgur

(突出显示的那个)。

这就是我的代码目前的样子:

i {
  cursor: pointer;
}

a {
  color: inherit;
}

th {
  white-space: pre-wrap;
  font-size: 25px;
  color: goldenrod;
}

p {
  font-family: 'BioRhyme', serif;
  font-size: 35px;
}
<table class="table table-hover table-borderless">
  <thead class="thead-dark">
    <tr>
      <th>Name</th>
      <th>IP</th>
      <th>Port</th>
      <th>Ping</th>
      <th>Players</th>
    </tr>

  </thead>
  <tbody id="table">
    <tr>
      <th>Hexah's Test</th>
      <th>0.0.0.0</th>
      <th>27015</th>
      <th>koala</th>
    </tr>
    <tr>
      <th>Hexah's Test</th>
      <th>0.0.0.0</th>
      <th>27015</th>
      <th>koala</th>
    </tr>
  </tbody>
</table>

我正在使用 Bootstrap Material Design v4

谢谢!

最佳答案

您可以在 CSS 文件中使用它来增加表格中元素之间的边框宽度:

td {
  border-bottom: 5px solid black;
  border-top: 5px solid black;
}

您可以使用这 3 个值更改边框的 colorthicknessstyle。当然,您也可以将这些属性添加到 thtable,将 border 样式更改为其他边:

  • 边框
  • border-right
  • border-left

了解有关 CSS 表格的更多信息 here .

关于css - 设置表格行之间线条的粗细,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51159638/

相关文章:

javascript - 使用 PHP 在升序和降序日期之间切换 onclick

html - IE8, IE9 - 如何使背景图像模糊

javascript - CSS - 浏览器如何知道在实现固定表头表时如何使两个表的列保持同步?

html - 限制 CSS 表格的高度 - 忽略内容高度

html - CSS 中棘手的表格格式

html - CSS 单元格边距

jquery - 动画 - Css 中的 scrollTop

javascript - jQuery appear() 和 show() 方法有什么区别?

php - 禁用 JavaScript 时显示/隐藏登录表单

css - 如何固定第二列的位置?