簡體   English   中英

使用背景顏色和邊框半徑設置表格行的樣式

[英]Style a table row with background color and border radius

我有一個包含 2 列的表格行,我想放置一個帶邊框半徑的背景顏色。

 <table> <tfoot> <tr> <td class="d-inline-block ltr font-14 font-weight-bold"> Price:</td> <td class="text-right text-primary"> 1600$ </td> </tr> </tfoot> </table>

在此處輸入圖像描述

通過僅將背景顏色提供給 tds 而不會遇到此問題

在此處輸入圖像描述

 tr td:first-child { border-top-left-radius: 150px; border-bottom-left-radius: 150px; } tr td:last-child { border-top-right-radius: 150px; border-bottom-right-radius: 150px; } td { padding: 12px; background-color: yellow; border: solid 0px #000; } table { border-collapse: collapse; }
 <table> <tfoot> <tr> <td class="d-inline-block ltr font-14 font-weight-bold"> Price: </td> <td class="text-right text-primary"> 1600$ </td> </tr> </tfoot> </table>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM