【发布时间】:2021-04-01 16:02:58
【问题描述】:
在下面的代码中,我想在单元格之间设置垂直线,最好的方法是什么?我尝试过为表格提供背景颜色,但它与为表格单元格提供边框相同,然后尝试使用左边框或右边框,但它会在单元格外多出一行。在这里,我想要单元格之间的垂直线。请帮忙。
table tr td {
background-color: #dedede;
color: black
}
<table>
<tr>
<td>this is first cell</td>
<td>this is second cell</td>
<td>this is third cell</td>
</tr>
<tr>
<td>this is fouth cell</td>
<td>this is fifth cell</td>
<td>this is sixth cell</td>
</tr>
</table>
【问题讨论】:
-
查找第一个孩子/最后一个孩子