我在表格中的边框之间有一些空格。
我不明白为什么,
一直在尝试使用负边距,因此它们彼此重叠,但边距不起作用。
因为它是一张 table ,所以我在 tdth 上都有一个左边框。
但我在侧边框和顶部/底部边框之间也有一个空间。

This 是我创建的 fiddle 。

一些表格css

.profile-table {
  height: 100%;
}

.profile-table td {
  text-align:   center;
  border-right: 1px solid #ccc;
  font-size:    1.2em;
}

.profile-table th {
  text-align:   center;
  border-right: 1px solid #ccc;
  width:        100px;
}

.profile-table tr{
}

.profile-table *:last-child{
  border: none;
}

最佳答案

使用 border-collapse:collapse 合并边框

看到这个 fiddle

关于html - 删除表格中边框之间的空白,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16104135/

10-12 00:06
查看更多