在CSS中,定义了被访问过的链接的颜色(a:visited),结果当链接被访问过后,该链接的颜色不再改变,即定义鼠标在超级链接上的颜色(a:hover)不起作用了。我找到这里:
锚点伪类 Anchor Pseudo-classes
A link that is active, visited, unvisited, or when you mouse over a link can all be displayed in different ways in a CSS-supporting browser:
当一个连接处于 活动,被访问,未访问或是当你鼠标移动到上面的时候都可以给它以不同的方式来表现,前提是浏览器支持CSS:
1.a:link {color:#FF0000}/* unvisited link */2.a:visited {color:#00FF00}/* visited link */3.a:hover {color:#FF00FF}/* mouse over link */4.a:active {color:#0000FF}/* selected link */
Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!
注意 a:hover 必须在a:link和 a:visited后出现,要有顺序才能正常显示效果!
Note: a:active MUST come after a:hover in the CSS definition in order to be effective!!
注意: CSS中a:active必须出现在a:hover定义后才能有效果!
当CSS中定义了链接的已访问样式a:visited后,a:hover样式可能失效。解决办法是确保在CSS定义中,a:hover紧跟在a:visited之后,以保持正确的顺序,这样a:hover才能生效。
2155

被折叠的 条评论
为什么被折叠?



