【发布时间】:2022-06-14 14:22:20
【问题描述】:
table{
border-collapse: collapse;
}
th,td{
padding: 5px;
}
.border-none{
border:none;
}
<table border="1">
<thead>
<tr>
<th>Id</th>
<th>Title</th>
<th>Price</th>
<th>Qte</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Pc</td>
<td>1440</td>
<td>2</td>
</tr>
<tr>
<td>2</td>
<td>Phone</td>
<td>1300</td>
<td>3</td>
</tr>
</tbody>
<tfoot>
<tr>
<th class="border-none"></th>
<th>Total</th>
<th>100</th>
<th>5</th>
</tr>
</tfoot>
</table>
我的桌子是这样的:
但是我怎样才能删除最后一行的第一个单元格:
我也试过了:
style='border:none;'
和
style='border-left:none;border-bottom:none;border-top:none'
但没有任何改变,非常感谢任何帮助!
【问题讨论】:
-
你可以直接设置你的td和th:
th, td{ border: 1px solid grey; } tfoot th:first-child { border:0; }