本文翻译自:Add border-bottom to table row
First I tried the direct way, ie: 首先我尝试了直接的方式,即:
<tr style="border-bottom:1pt solid black;">
But that didn't work. 但那没用。 So I added CSS like this: 所以我添加了这样的CSS:
tr {
border-bottom: 1pt solid black;
}
That still didn't work. 那还是行不通的。
#1楼
#2楼
Add to your table rule: 添加到您的表规则:
table {
border-collapse: collapse;
}
#3楼
td { border-bottom: 1px solid #000; }
#4楼
<tr class="border_bottom">
tr.border_bottom td {
border-bottom:1pt solid black;
}
#5楼
Display the row as a block. 将行显示为块。
tr {
display: block;
border-bottom: 1px solid #000;
}
and to display alternate colors simply: 并简单地显示替代颜色:
tr.oddrow {
display: block;
border-bottom: 1px solid #F00;
}
#6楼
One way around this: 解决这个问题的方法:
<tr>
<td>
Example of normal table data
</td>
<td class="end" colspan="/* total number of columns in entire table*/">
/* insert nothing in here */
</td>
</tr>
td.end{
border:2px solid black;
}