CSS pseudo-classes are used to add special effects to certain selectors. You don't need to use JavaScript or any other script to use these effects.
The most commonly used pseudo-classes are -
Value | Description |
---|---|
:link p> | Use this class to add special styling to unvisited links. |
:visited | Use this class to add the style of a special visit link. |
:hover | Use this class to add a special style to an element when the mouse is hovering over it. |
:active | Use this class to add styles for special active elements. |
:focus | Use this class to add special styles to an element when it has focus. |
:first-child | Use this class to add special styles to the first child element of some other elements. |
:lang | Use this class to specify the language to be used in the specified element. |
The above is the detailed content of What are CSS pseudo-classes. For more information, please follow other related articles on the PHP Chinese website!