Transitions and animation

Smooth hover effects and keyframe animation, used with restraint.

A transition animates a change between two states. It is the right tool for hover effects.

Edit the CSS
Preview

Keyframes

Use @keyframes when something should run by itself.

Edit the CSS
Preview

Animate transform and opacity where you can, because browsers run them smoothly. Respect readers who turn motion off by checking the prefers-reduced-motion media query.

โ† Responsive designCSS quick reference โ†’