我试着做一张颜色背景和身体有圆角的桌子。我已经设法使这个工作,但现在白色的角落显示在桌面下面.有人能帮帮我吗。
这是我的代码的一个例子,但是我使用的是引导,所以没有垂直边框。我只需要把身体上白色的顶角去掉。http://jsfiddle.net/chickatysplit/cts858ro/
<div class="table-background">
<table class="table">
<thead style="background-color: #e5e5e5;">
<tr style="height: 20px;">
<th>table header</th>
<th>table header</th>
<th>table header</th>
<th>table header</th>
</tr>
</thead>
<tbody>
<tr style="border-top-left-radius: 10px;">
<td>some text</td>
<td>some text</td>
<td>some text</td>
<td >some text</td>
</tr>
<tr>
<td>some text</td>
<td>some text</td>
<td>some text</td>
<td>some text</td>
</tr>
</tbody>
</table>
</div>为了澄清,我想头有相同的颜色与灰色的背景,但身体有白色的背景与圆角。请帮帮我!
发布于 2014-10-01 23:15:54
您需要删除表上的白色背景,并将td单元格设置为白色背景:
...
table {
border-collapse: separate;
border-radius: 10px;
}
td { background: #fff; }
...此外,没有必要使用内联样式声明(即<tr style="...">):这就是样式表的用途。:)
https://stackoverflow.com/questions/26152111
复制相似问题