HTML/CSSBeginner#css#transitions#animations

How do CSS transitions work?

Transitions animate a property smoothly between two states over a duration, triggered by a state change like :hover or a class toggle. You specify the property, duration, timing function, and optional delay.

Example
.button {
  background: blue;
  transition: background 0.3s ease-in-out;
}
.button:hover { background: darkblue; }

Related Questions

1
HTML/CSSIntermediate#css#animations

How do CSS keyframe animations work?

Open
2
HTML/CSSIntermediate#css#transforms

What CSS transform functions are commonly used?

Open
3
HTML/CSSAdvanced#css#performance

Why should you animate transform/opacity instead of top/left/width for performance?

Open