CSS
CSS TransitionsCSS Transitions
CSS transitions smoothly animate single property changes.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
CSS transitions create simple animations when an element changes state, like hovering over a button. Instead of instantly changing colors, the transition tells the browser to slowly blend the old color into the new one.
Syntax
Syntax
Example
Example
Key Points
- Transitions only fire when a property value changes.
- You must specify the property to transition.
- You must specify the duration of the effect.
- The `ease` timing function creates a natural slow-down effect.