# linear()

> The `linear()` CSS easing function creates a timing function by interpolating linearly between a set of points.

## How do I make spring or bounce easing in CSS?

The easing function that defines the progress of an animation through a list of points, interpolating linearly between them. Allows approximating complex effects like bounce or spring that are impossible with `cubic-bezier()`.

- Topic: Animations
- Type: function
- Browser support: Chrome 113+, Chrome Android 113+, Edge 113+, Firefox 112+, Firefox Android 112+, Safari 17.2+, Safari iOS 17.2+

## Example

Wrong:

```css
.ball {
  animation: drop 1s cubic-bezier(0.3, 1.6, 0.5, 1);
}
```

Right:

```css
.ball {
  animation: drop 1s ease-out;
  animation-timing-function: linear(0, 1 40%, 0.8 55%, 1 70%, 0.95 85%, 1);
}
```

`linear()` lists progress points, so the ball can bounce several times, which `cubic-bezier()` can't do.

## Common mistakes

- Confusing `linear()` with the 'linear' keyword, which has no stops.

## Key points

- Spring and bounce curves use `linear()` with enough points instead of a JavaScript animation library.
- A simpler easing fallback is declared before the `linear()` one.
- Bouncy motion is replaced with a plain fade or removed under `prefers-reduced-motion: reduce`.

## Interview questions

### How do I write points in linear()?

List output values from 0 to 1, each with an optional input percentage, like `linear(0, 1 40%, 1)`. Points without a percentage are spread evenly.

### Can I use linear() in transitions?

Yes. It works anywhere an easing function is accepted, including `transition-timing-function` and `animation-timing-function`.

## Related cards

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

---

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