我给box-shadow到tr在table它的正常工作在所有浏览器,但IE-10它显示box-shadow在所有的td,为什么呢?
tr {
box-shadow: 2px 0 0px #888 inset;
}Run Code Online (Sandbox Code Playgroud)
<table border=0 cellsapcing=0 cellpadding=6>
<tr>
<th>Column</th>
<th>Column</th>
<th>Column</th>
<th>Column</th>
</tr>
<tr>
<td>Column</td>
<td>Column</td>
<td>Column</td>
<td>Column</td>
</tr>
</table>Run Code Online (Sandbox Code Playgroud)
铬
IE 10
注意:我不能使用border这就是我给的原因box-shadow
我采取了一些不同的方法,并将框阴影分配给第一个th和td元素.这个解决方案围绕问题而不是解决问题 - 但我觉得这样有效.
tr th:first-child, tr td:first-child {
box-shadow: 2px 0 0px #888 inset;
}Run Code Online (Sandbox Code Playgroud)
<table border=0 cellsapcing=0 cellpadding=6>
<tr>
<th>Column</th>
<th>Column</th>
<th>Column</th>
<th>Column</th>
</tr>
<tr>
<td>Column</td>
<td>Column</td>
<td>Column</td>
<td>Column</td>
</tr>
</table>Run Code Online (Sandbox Code Playgroud)