【发布时间】:2020-12-18 03:05:32
【问题描述】:
我只想折叠外部边框,而不是内部边框:
table, tr {
border: 1px solid black;
padding: 7px;
border-collapse: collapse;
}
th {
background: #ccccff;
}
<table>
<thead>
<tr>
<th>Data 1</th>
<th>Data 2</th>
</tr>
</thead>
</table>
不会像Data 1 | Data 2那样显示th之间的边界,为什么? (以及如何在th 元素之间添加这些边界)?
【问题讨论】:
-
您是希望整个表格有边框(包括外部),还是只是在表格外部没有边框的内部单元格?
标签: html css html-table border