CSS
table tr {border-bottom:1px solid #008999}
HTML
< 相关标签: 3条回答 面向向阳花 2020-12-28 13:15 Add: table { border-collapse: collapse; } Otherwise tr creates no single block. Simple example: table { border: 5px solid #900; background: #fff; } tr { border: 5px solid #090; } td { background: #ccc; padding: 5px 0; } table + table { border-collapse: collapse; } <table> <tr> <td>def</td> <td>ault</td> </tr> </table> <table> <tr> <td>coll</td> <td>apse</td> </tr> </table> 0 讨论(0) 发布评论: 提交评论 加载中... 感动是毒 2020-12-28 13:27 tr by definition wont take border styles. You need to apply it to the td's within it: table tr td {border-bottom:1px solid #008999} 0 讨论(0) 发布评论: 提交评论 加载中... 执念已碎 2020-12-28 13:35 Try giving table tr th {border-bottom:1px solid #008999} Then you can use table { border-collapse: collapse; } table tr {border-bottom:1px solid #008999; } See The collapsing border model 0 讨论(0) 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
Add:
table { border-collapse: collapse; }
Otherwise tr creates no single block.
tr
Simple example:
table { border: 5px solid #900; background: #fff; } tr { border: 5px solid #090; } td { background: #ccc; padding: 5px 0; } table + table { border-collapse: collapse; }
<table> <tr> <td>def</td> <td>ault</td> </tr> </table> <table> <tr> <td>coll</td> <td>apse</td> </tr> </table>
tr by definition wont take border styles. You need to apply it to the td's within it:
table tr td {border-bottom:1px solid #008999}
Try giving
table tr th {border-bottom:1px solid #008999}
Then you can use
table { border-collapse: collapse; } table tr {border-bottom:1px solid #008999; }
See The collapsing border model