href不能在Firefox和歌剧中工作 [英] href not working in Firefox and opera
问题描述
我使用Css3效果,使我的菜单看起来更好,没有问题,然而,我不知道一些奇怪的原因,当我点击菜单项,他们不重定向到所需的页面,我的href =abc。 aspx不工作在Firefox,Opera,但在Chrome中工作得很好。这是我使用的Css3代码
#Menu a :active,
#Menu a.active:before,#Menu a:hover:before
{
Content:'';
position:absolute;
z-index:-1;
width:0px;
height:0px;
left:50%;
top:50%;
border-radius:50%;
box-shadow:0 0 35px 30px#ADD7E7;
}
我的菜单看起来有点像
但是当我删除那个Css3样式时,href工作。我与这是为什么这种情况发生。
问题可能源于样式
#Menu a:active
和伪元素。尝试分开它们,或者甚至从定义中删除 #Menu a:active
。然后,您可以将 z-index
重新设置为 -1
,因为它只会应用于伪元素。 我在此设置了 jsfiddle这里。
I am using Css3 effects to make my menu look fancier , no issues with that however , I dont know for some strange reasons , when I click on the menu items , they dont redirect to desired pages ie my href="abc.aspx" wont work in Firefox , Opera , but works well in Chrome.Here is the Css3 code which I use
#Menu a:active,
#Menu a.active:before,#Menu a:hover:before
{
Content: ' ';
position:absolute;
z-index:-1;
width:0px;
height:0px;
left:50%;
top:50%;
border-radius:50%;
box-shadow:0 0 35px 30px #ADD7E7;
}
My menu looks something
However when I remove that Css3 styling , the href works.Can anybody help me out with this as to why this happens. Any suggestions are welcome.
Thanks
The problem may stem from styling #Menu a:active
together with the pseudo elements. Try separating them or even just remove #Menu a:active
from the definition altogether. Then you can set your z-index
back to -1
as it will only be being applied to the pseudo element.
I've set up a jsfiddle here.
这篇关于href不能在Firefox和歌剧中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!