本文转自:http://www.th7.cn/web/html-css/201309/12897.shtml
css定义超链接是要有先后顺序的。否则,在某些浏览器里面有可能会出现某个样式不起作用的bug。不能正确显示想要的效果。
CSS属性的排列顺序: L-V-H-A 。
L-V-H-A是link、visited、hover、active的简写。
它们分别表示
A:link 超链接的默认样式
A:visited 访问过的(已经看过的)链接样式
A:hover 鼠标处于鼠标悬停状态的链接样式
A:active 当鼠标左键按下时,被激活(就是鼠标按下去那一瞬间)的链接样式。
正常顺序的代码如下:
a:link{color:#333 ;text-decoration:none ; }
a:visited { color:#333 ;text-decoration:none ;}
a:hover { color:#FF6600 ;text-decoration:underline ;}
a:active {text-decoration:none ; color:#FF6600 ;text-decoration:none ; }