gpt4 book ai didi

css - 不包括最后一行的表格外边框

转载 作者:太空宇宙 更新时间:2023-11-04 11:57:23 25 4
gpt4 key购买 nike

有没有办法让表格只有外边框,但不包括底行。所以倒数第二行的底部边框使它看起来像最后一行。我只能使用 css,因为它是 wordpress,所以我不能更改 html!看图片: enter image description here

优惠券代码和更新篮子实际上是最后一行

***** 编辑 *****这是 HTML(我无法编辑)

<table class="shop_table cart" cellspacing="0">
<thead>
<tr>
<th class="product-remove">&nbsp;</th>
<th class="product-thumbnail">&nbsp;</th>
<th class="product-name">Product</th>
<th class="product-price">Price</th>
<th class="product-quantity">Quantity</th>
<th class="product-subtotal">Total</th>
</tr>
</thead>
<tbody>

<tr class="cart_item">

<td class="product-remove">
<a href="http://uc.petekirkwood.co.uk/basket/?remove_item=02522a2b2726fb0a03bb19f2d8d9524d&amp;_wpnonce=967f1478b0" class="remove" title="Remove this item">×</a> </td>

<td class="product-thumbnail">
<a href="http://uc.petekirkwood.co.uk/shop//tedbaker/test-product-copy"><img width="180" height="135" src="http://uc.petekirkwood.co.uk/wp-content/uploads/2015/04/TedBaker_TravelDocHolderCoral_5-180x135.jpg" class="attachment-shop_thumbnail wp-post-image" alt="TedBaker_TravelDocHolderCoral_5"></a> </td>

<td class="product-name">
<a href="http://uc.petekirkwood.co.uk/shop//tedbaker/test-product-copy">Test Product (Copy) </a> </td>

<td class="product-price">
<span class="amount">£10.00</span> </td>

<td class="product-quantity">
<div class="quantity"><input type="number" step="1" min="0" name="cart[02522a2b2726fb0a03bb19f2d8d9524d][qty]" value="3" title="Qty" class="input-text qty text" size="4"></div>
</td>

<td class="product-subtotal">
<span class="amount">£30.00</span> </td>
</tr>
<tr>
<td colspan="6" class="actions">

<div class="coupon">

<label for="coupon_code">Coupon:</label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="Coupon code"> <input type="submit" class="button" name="apply_coupon" value="Apply Coupon">


</div>

<input type="submit" class="button" name="update_cart" value="Update Basket">


<input type="hidden" id="_wpnonce" name="_wpnonce" value="967f1478b0"><input type="hidden" name="_wp_http_referer" value="/basket/?removed_item=1"> </td>
</tr>

</tbody>
</table>

最佳答案

您可以选择倒数第二个元素

tr:nth-first-child {/*the first item*/
border-bottom: 2px solid black
}
tr:nth-last-child(2) { /*the second-last item*/
border-bottom: 2px solid black
}
tr:not(:last-child){/* all but not the last */
border-left: 2px solid black;
border-right: 2px solid black
}

关于css - 不包括最后一行的表格外边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30096310/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com