:hover{} precedence in gecko
writing somewhat of a css hack, styling for :hover {} works interestingly, but browsers treat a:hover
differently for full links VS hash tags.
from http://inqdrops.com/welcom/
a, a:active, a:visited { color: #765; text-decoration: none;}
:hover { color: #ff5e99; text-decoration:overline; background: #222}
for this code, hovers on <a href='http://what.eva/'></a>
and <a href='#whateva'></a>
behave differently. They also differ for webkit and gecko.
Can someone explain what is happening?
--
EDITED FOR EXPLANATION ON SOLUTIONthe answer by @babtek pointed me in the right direction, and the solution was to expand the 开发者_如何学Ccss rule to :hover, :visited:hover {...}
I think a:visited ends up being more specific than :hover since it has a tagname as well... your "#" links might not get flagged as visited?
WHy don;t you change the css to
a:hover
in case someone is intersted, what i was missing was the css rules' order. plus a psuedo:psuedo rule
a, a:active, a:visited {color: #765; text-decoration: none;}
:hover, :visited:hover { color: #ff5e99; text-decoration:overline; background: #222}
thanks fo the tips
精彩评论