CSS link styles
CSS link style:
a :link (not visited)
#a:hover
a:visited (visited: actually reached that page)
a:active (between mouse click and release) (interval, has no effect on a objects without href attributes)
These elements have different order when defining CSS, which will directly lead to different link display effects. Specificity is sorted from general to special: link--visited--hover--active The desired effect can be achieved as follows:a:link {color: blue}
a:visited{color: red}
##a:hover{color: yellow}a:active{color: white}
If defined like this:
a:hover{color: yellow}
a:link{color: blue}
a:visited{color: red}
a:active{color: white}
You can’t see hover It works, because :link is the most general effect and its scope is greater than hover, so the previous sentence is covered.
Example:
链接样式 注意: hover必须在:link和 a:visited之后定义才有效.
注意: active必须在hover之后定义是有效的.