2014-01-13 47 views
0

我在使用Firefox麻煩不工作,我CSS代碼:-webkit-box-shadow屬性在Firefox

#meni li:hover{ 
    opacity: 1; 
    filter: alpha(opacity=100); 
    -webkit-box-shadow: inset 0 4px 0 #FF0000; 
} 

它顯示在Chrome紅色的影子,但在Firefox這是行不通的。幫助任何人?

回答

2

您沒有包含-moz前綴。 -webkit僅用於Chrome/Safari等與webkit相關的瀏覽器。

#meni li:hover{ 
    opacity:1; 
    filter:alpha(opacity=100); 
    -webkit-box-shadow: inset 0 4px 0 #FF0000; 
    -moz-box-shadow: inset 0 4px 0 #FF0000; 
    box-shadow: inset 0 4px 0 #FF0000; 
} 
+0

感謝,現在的工作:) – user3173457

1
#meni li:hover{ 
box-shadow: inset 0 4px 0 #FF0000; /* use the standard, firefox doesn't need the prefix moz 
-webkit-box-shadow: inset 0 4px 0 #FF0000; 
} 
0

請添加以下代碼像下面:)

#meni li:hover{ 
     -webkit-box-shadow: inset 0 4px 0 #FF0000; /* for chrome and safari browser */ 
     -moz-box-shadow: inset 0 4px 0 #FF0000;/* for mozilla browser */ 
     box-shadow: inset 0 4px 0 #FF0000; /*common*/ 
    }