← Back to pseudo-classes
CSS Pseudo-class / Element
:hover
User ActionApplies styles when the user moves their pointer over an element.
Syntax
selector:hover { }Example
button:hover { background: #3dffa0; }Common use cases
- Highlighting buttons and links on mouse over
- Revealing hidden tooltips or menus
- Changing colors on interactive elements
Practical developer insight
:hover doesn't work on touchscreens — never hide critical content behind hover-only interactions.