CSS3/Selectors/pseudo-classes/:hover
Pseudo-classes :hover
The :hover pseudo-class applies while the user designates an element with a pointing device, but does not necessarily activate it.
Syntax
selector:hover{ properties }
Point, Note
- There may be document language or implementation specific limits on which elements can become :active or acquire :focus.
Example
[style.css]
a:link, a:visited{ color: red; } a:hover{ color: green; }
[index.html]
<body> <p><a href="http://www.w3.org/">W3C</a> is an international community</p> </body>
The CSS Selectors Level 3 specification defines the :hover pseudo-class in 6.6.1.2. The user action pseudo-classes :hover, :active, and :focus.