gpt4 book ai didi

css3 圆形边框表格

转载 作者:行者123 更新时间:2023-12-02 22:00:27 25 4
gpt4 key购买 nike

我正在尝试制作圆形边框表格。但我的边界问题不大,表格边框不是圆形的..

grid1 { width:100%; border:1px solid #000}

这是例子 http://jsfiddle.net/NHNFx/

<table class="grid1"> 
<tr>
<th>Salutation</th>
<td>MR</td>
</tr>
<tr>
<th>First Name</th>
<td>Greg</td>
</tr>
<tr>
<th>Last Name</th>
<td>Oden</td>
</tr>
</table>

table { border-collapse:collapse; border-spacing:0; border:0; }


.grid1 { width:100%; border:1px solid #000}
.grid1 tr th { width:115px; padding:20px; background:blue; border-bottom:1px solid #c8c8c8; border-right:1px solid #c8c8c8;}
.grid1 tr td { padding:20px; background:#f9f9f9; border-bottom:1px solid #c8c8c8; }

.grid1 tr:first-child th { border-radius:2em 0 0 0; }
.grid1 tr:last-child th { border-radius:0 0 0 2em ; }
.grid1 tr:first-child td:last-child { border-radius:0 2em 0 0; }
.grid1 tr:last-child td:last-child { border-radius:0 0 2em 0 ; }

请帮帮我...

最佳答案

您需要删除防止边框变圆的 border-collapse 属性,无论如何您使用的是 border-spacing: 0; 所以您不必为你的表格使用 border-collapse

Demo

关于css3 圆形边框表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17038886/

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