:hover

noun

say it: “HUV-er” /ˈhʌvər/ or “KOH-lun HUV-er” /ˈkoʊlən ˈhʌvər/

A pseudo-class that matches an element while the mouse pointer is over it, as in button:hover. Touch screens have no pointer, so never hide anything important behind it.

What does :hover do?

:hover applies styles while the mouse pointer is over an element.

.product-card:hover { box-shadow: 0 4px 12px rgb(0 0 0 / 20%); }

In a sentence

  • “With :hover, the Book a tune-up button turns a darker orange when the pointer moves over it.”

Level: Apprentice · More CSS terms at this level

Updated