我在tr的内部插入边框,但它没有应用边框。 我的代码
<tr class="shipping">
<th>Shipping 2</th>
<td data-title="Shipping 2">
<p>There are no shipping methods available. Please check your address or contact us if you need any help.</p>
<p class="woocommerce-shipping-contents"><small>Military Grade Paracord Kit ×1</small></p>
</td>
和css是
tr {
border-top: 9px solid red;
}
答案 0 :(得分:0)
如果您想设置tr
元素的边框,则应将表格的border-collapse
设置为collapse
:
table {
border-collapse: collapse
}
tr {
border-top: 9px solid red;
}
<table>
<tr class="shipping">
<th>Shipping 2</th>
<td data-title="Shipping 2">
<p>There are no shipping methods available. Please check your address or contact us if you need any help.</p>
<p class="woocommerce-shipping-contents"><small>Military Grade Paracord Kit ×1</small></p>
</td>
</tr>
</table>
答案 1 :(得分:0)
你可以试试这个:
tr > th {
border-top: 9px solid red;
}