【发布时间】:2020-10-05 18:16:46
【问题描述】:
.table-content {
overflow-x: auto;
}
.table-content table tr th {
font-weight: 500;
}
table {
border-collapse: collapse;
width: 100%;
}
tr {
border-bottom: 1px solid rgba(38, 46, 46, 0.2);
}
th {
background: rgb(0 0 0 / 15%);
padding: 15px;
border-bottom: 1px solid rgba(38, 46, 46, 0.2);
color: $dark-text;
font-size: 0.875rem;
font-weight: 600;
text-align: left;
text-transform: uppercase;
white-space: nowrap;
}
td {
padding: 15px;
font-size: 1rem;
}
<div class="table-content">
<table>
<tr>
<th rowspan="1"></th>
<th>Product</th>
<th>Rate</th>
<th>Discount</th>
<th>Quantity</th>
<th rowspan="1"></th>
<th>Amount</th>
</tr>
<tr>
<td>
<span>
<img src="/assets/images/img-placeholder.svg" >
</span>
</td>
<td>keychain</td>
<td>200</td>
<td>20</td>
<td>Ordered</td>
<td>10</td>
<td>20</td>
</tr>
<tr>
<td colspan="4"></td>
<td>Invoiced</td>
<td>2</td>
<td colspan="1"></td>
</tr>
<tr>
<td colspan="4"></td>
<td>Shipped</td>
<td>1</td>
<td colspan="1"></td>
</tr>
<tr>
<td colspan="4"></td>
<td>Returned</td>
<td>1</td>
<td colspan="1"></td>
</tr>
</table>
</div>
在这种情况下,我想让边框底部颜色与其他边框相同,表格的第一行与其他 tr 具有相同的边框底部颜色属性,但在第一行中,我添加了td 比如 image, rate, discount 所以问题是底部边框颜色比其他 tr 边框要深一些。我怎样才能实现相同的边框颜色..?
【问题讨论】:
标签: javascript html css angular