1 回答
TA贡献1824条经验 获得超6个赞
这里有两个主要问题,
1) CSS属性border-collapse: collapse;应该在table元素下,例如,
table {
width: 100%;
max-height: 500px;
overflow: scroll;
border-collapse: collapse;
}
2)确保和具有相同的类名.border-bottom。theadtbody tr
.border-bottom {
border-bottom: 2px solid #CCD5DE;
}
table {
width: 100%;
max-height: 500px;
overflow: scroll;
border-collapse: collapse;
}
thead {
color: red;
}
th {
font-weight: 700;
font-size: 20px;
letter-spacing: 1px;
text-align: left;
padding-top: 20px;
padding-bottom: 20px;
}
td {
font-weight: 400;
font-size: 18px;
letter-spacing: .75px;
text-align: left;
padding-top: 20px;
padding-bottom: 20px;
}
<div class="spaced-div">
<table>
<thead>
<tr class="border-bottom">
<th>Date</th>
<th>Stock</th>
<th>Quantity</th>
<th>Price</th>
<th>Fees</th>
<th>Subtotal</th>
</tr>
</thead>
<tbody>
<tr class="border-bottom">
<td>March 21, 2020</td>
<td>DMC</td>
<td>1,330</td>
<td>5.71</td>
<td>23.54</td>
<td>7,617.84</td>
</tr>
</tbody>
</table>
</div>
- 1 回答
- 0 关注
- 65 浏览
添加回答
举报