:hover

The :hover pseudo-class fires when the user hovers over the element, but does not necessarily activate it. This style can be overridden by other link-related pseudo-classes such as :link, :visited, and :active appearing in the appropriate order. To style links properly, you need to insert the :hover rule before the :link and :visited rules, but after the :active. The :hover pseudo-class can be applied to any pseudo-element.

Syntax



element:hover {
  property: value;
}