Reading the graph
The horizontal axis is time through the animation, from start (left) to end (right). The vertical axis is progress: how far through the animation’s actual change you are. A straight diagonal line would be linear: equal progress for equal time.
Each handle pulls the curve near one end. The first handle (linked by a dashed line to the bottom-left corner) shapes how the animation begins; the second handle (linked to the top-right corner) shapes how it ends. Pull a handle up and away from its corner and that part of the animation moves faster than linear; push it down and it moves slower.
The shaded band is where progress stays between 0 and 1: a normal animation without overshoot. A handle placed outside the band is what produces a curve that overshoots and comes back, which is exactly the “back” family of presets.
The four numbers
A CSS cubic-bezier(x1, y1, x2, y2) value is nothing but those two handle positions. The curve’s own start and end, (0,0) and (1,1), are fixed by definition and never appear in the four numbers.
.card {
transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
x1 and x2 must stay between 0 and 1. A timing function has to return exactly one progress value for every moment in time, and letting x run backwards or past 1 would break that: CSS itself rejects a cubic-bezier() with x outside that range.
y1 and y2 have no such limit. Progress is free to overshoot past 1 or dip below 0, and that’s the whole mechanism behind a “pop” or “bounce” style animation: the element runs past its target and eases back.
The named keywords, decoded
CSS’s built-in easing words are just cubic-bezier curves with specific numbers:
| Keyword | Same as |
|---|---|
ease |
cubic-bezier(0.25, 0.1, 0.25, 1) |
ease-in |
cubic-bezier(0.42, 0, 1, 1) |
ease-out |
cubic-bezier(0, 0, 0.58, 1) |
ease-in-out |
cubic-bezier(0.42, 0, 0.58, 1) |
linear |
cubic-bezier(0, 0, 1, 1) |
Starting from one of these and nudging a handle is usually faster than building a curve from nothing: the presets above load each one so you can feel the difference a small drag makes.
Why the preview matters more than the shape
Two curves that look similar on the graph can feel completely different in motion: a slight difference in the first handle changes how “snappy” the start feels in a way that’s hard to judge from the line alone. Press Play and watch the ball before deciding a curve is right; the graph tells you the shape, the preview tells you the feel. The track is as wide as the whole motion, overshoot included, with a marker where the animation starts and ends, so a “back” curve visibly runs past the end marker and returns without leaving the track.