gpt4 book ai didi

html - Box-shadow 出现在 IE 的所有列中

转载 作者:太空狗 更新时间:2023-10-29 13:47:56 26 4
gpt4 key购买 nike

我在 table 中将 box-shadow 赋予 tr 它在所有浏览器中都工作正常,但在 IE- 10 它在所有 td 中显示 box-shadow,为什么?

tr {
box-shadow: 2px 0 0px #888 inset;
}
<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>

Chrome

enter image description here

IE 10

enter image description here

注意:我不能使用border,所以我给了box-shadow

最佳答案

我会采取一些不同的方法,并将框阴影分配给第一个 thtd 元素。这个解决方案绕过问题,而不是解决它——但我觉得它同样有效。

tr th:first-child, tr td:first-child {
box-shadow: 2px 0 0px #888 inset;
}
<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>

关于html - Box-shadow 出现在 IE 的所有列中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41695845/

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