CSS: hover selector
CSS selectors complete reference manual
Definition and Usage
: Hover the mouse over the link when you add a special style.
Tip:: hover selector can be used for all elements, not just links.
Tip: : Link selector set unvisited pages link style, : visited selector setting visited pages linked style : active selector setting when you click on the link styles.
Note: In order tohave the desired effect, the CSS definition,: hover must be in the: link and: visited after! !
Browser Support
Figures in the table represent the first browser to support the version number of the property.
选择器 | |||||
---|---|---|---|---|---|
:hover | 4.0 | 7.0 | 2.0 | 3.1 | 9.6 |
Note: You must declare in IE <DOCTYPE!> In order to ensure: hover selector efficiently.
Related Pages
CSS tutorial: CSS Links
CSS tutorial: CSS pseudo-classes
Try it Yourself - Examples
Examples
Active, visited, unvisited, or when there are hover on link:
a:visited {color:green;}
a:hover {color:red;}
a:active {color:yellow;}
try it"
Examples
Different styles of link style:
a.ex2: hover, a.ex2: active {font-size: 150%;}
try it"