gpt4 book ai didi

css - box-shadow 在 chrome 或 safari 中不起作用

转载 作者:行者123 更新时间:2023-11-28 13:36:52 27 4
gpt4 key购买 nike

我正在尝试为我网站上的一些表格单元格添加一个嵌入阴影...但是阴影仅显示在 firefox 中,而不显示在 safari 或 chrome 中。然而,这些浏览器确实接受了我已将所有偶数行设置为白色背景的事实。我希望那里有任何简单的解决方案!

代码如下:

.appdescription tr:nth-child(even) {
background-color: white;
-webkit-border-radius: 2px;
-webkit-box-shadow: inset 0px 0px 3px 0px rgba(0,0,0,0.3);
-moz-box-shadow: inset 0px 0px 3px 0px rgba(0,0,0,0.3);
-moz-border-radius: 2px;
box-shadow: inset 0px 0px 3px 0px rgba(0,0,0,0.3);
border-radius: 2px;
}

和 html:

<div class="appdescription">
<table>
<tr><td><h3> Current Version </h3></td></tr>
<tr><td><a> 1.4 </a></td></tr>
<tr><td><h3> Description </h3></td></tr>
<tr><td><a>
How much of a Doctor Who fan are you?
Do you consider yourself a Whovian?
Do you know more than your friends about Doctor Who?
Find out by taking the Whovian Test.

Developed by Fabula Studios
www.fabulastudios.co.uk </a></td></tr>
<tr><td><h3> What's new </h3></td></tr>
<tr><td><a> New Logo </a></td></tr>

最佳答案

添加 display: block;到那个 CSS,它应该可以工作。

但我建议您留下表格并将该部分完全转换为简单的 <ul>

关于css - box-shadow 在 chrome 或 safari 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9446696/

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