# animation-timing-function

> The `animation-timing-function` CSS property specifies the pace and rhythm of an animation.

## How do I change the easing of a CSS animation?

The property that defines how the animation progresses over time, controlling the speed at which it changes from one style to another. Options like 'ease', 'linear', 'ease-in' and 'ease-out' create different pacing effects for the animation.

- Topic: Animations
- Type: property
- Browser support: Chrome 43+, Chrome Android 43+, Edge 12+, Firefox 16+, Firefox Android 16+, Safari 9+, Safari iOS 9+

## Example

Wrong:

```css
.spinner {
  animation: spin 1s infinite;
}
```

Right:

```css
.spinner {
  animation: spin 1s linear infinite;
}
```

'linear' keeps the rotation speed constant, while the default 'ease' slows down at the start and end of each turn.

## Common mistakes

- A spinner speeds up and slows down on each turn because the default is 'ease'.
- Expecting one easing curve across all keyframes, while it repeats between each pair.

## Key points

- Spinners and progress loops use 'linear', so the speed doesn't pulse on each cycle.
- Custom curves use `cubic-bezier()` or `linear()`, not extra keyframes that fake easing.
- Easing is understood to apply to each segment between keyframes, not across the whole animation.

## Interview questions

### What is the default animation-timing-function?

'ease', which starts slowly, speeds up and slows down again at the end.

### Can I use steps() for sprite animations?

Yes. `steps(8)` jumps between 8 frames with no values in between, which suits sprite sheets and typing effects.

## Related cards

- [linear()](https://wonderium.dev/css/linear-easing.md)
- [animation](https://wonderium.dev/css/animation.md)
- [transition-timing-function](https://wonderium.dev/css/transition-timing-function.md)
- [@keyframes](https://wonderium.dev/css/keyframes.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/animation-timing-function
- Last updated: 2026-11-25
