我在IE8中设计TH最后一个孩子时遇到了困难. 请在这里找到小提琴. http://jsfiddle.net/archanabr05/yokLbocx/ 问题是:我想在标题单元格之间创建一个白色边框,但避免使用最后一个标题单元格. 所
请在这里找到小提琴. http://jsfiddle.net/archanabr05/yokLbocx/
问题是:我想在标题单元格之间创建一个白色边框,但避免使用最后一个标题单元格.
所以我用过:
CSS:
th:last-child {
border-right:none;
}
我知道这在IE8中不起作用,我们有什么解决方案可以解决它,jquery对我也没关系.
我没有固定的列.因此我不能基于固定数量的单元格进行样式.
使用:第一个孩子 – http://caniuse.com/#feat=css-sel2.table{
border-spacing: 0;
border:2px solid #e5e5e5;
border-collapse: collapse;
}
tr th{
}
th{
padding:30px;
background:#e5e5e5;
border-left: 2px solid #fff;
}
th:first-child{
border-left: none;
}
td {
border-right: 2px solid #e5e5e5!important;
border-top: 1px solid #e5e5e5!important;
padding: 30px;
background:#fff
}
<table class="table">
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
<tr>
<td>Content 1</td>
<td>Content 2</td>
<td>Content 3</td>
</tr>
<tr>
<td>Yes</td>
<td>Yes</td>
<td>No</td>
</tr>
</table>
