Pseudo-class (CSS)
From Wiki @ Karl Jones dot com
In Cascading Style Sheets, a pseudo-class is a keyword added to selectors that specifies a special state of the element to be selected.
Description
For example :hover will apply a style when the user hovers over the element specified by the selector.
Pseudo-classes, together with pseudo-elements, let you apply a style to an element in relation to external factors, including:
- The history of the navigator (:visited, for example)
- The status of its content (like :checked on some form elements)
- The position of the mouse (like :hover which lets you know if the mouse is over an element or not)
Pseudo-elements
Compare Pseudo-elements.
See also
External links
- Pseudo-classes @ MDN
- CSS Pseudo-classes @ W3Schools