我遇到了Firefox问题,我的CSS
代码是:
#meni li:hover{
opacity: 1;
filter: alpha(opacity=100);
-webkit-box-shadow: inset 0 4px 0 #FF0000;
}
它在Chrome中显示红色阴影,但在Firefox中它不起作用。帮助任何人?
答案 0 :(得分: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;
}
答案 1 :(得分: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;
}
答案 2 :(得分: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*/
}