box-shadow无法在chrome或safari中使用

时间:2012-02-25 18:19:05

标签: css3

我试图在我的网站上给一些表格单元格插入阴影...但是阴影只显示在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>

1 个答案:

答案 0 :(得分:2)

向该CSS添加display: block;,它应该可以正常工作。

但我建议你离开桌子,然后将这部分完全转换成简单的<ul>