Compare a CSS timing curve with linear and stepped motion
Admin ·
Read a timing curve as a mapping from elapsed time to progress. Comparing two functions at the same time shows how far an animation can move before its duration ends.
Compare the progress at half the elapsed time
Select Reset example. Timing function is Ease and Time is 50%. The selected easing shows 80.24% output progress, while the linear reference shows 50%.
The graph uses time on the horizontal axis and progress on the vertical axis. The Bézier control points shape both coordinates, so evaluate the curve where its horizontal coordinate reaches 50% to find the correct progress.
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);Sample both sides of the first step boundary
Choose Steps, set the count to 4 and use jump-end. At 24% time the selected output is still 0.00%. At 25% time it jumps to 25.00%.
Change Step position to jump-start. At 0% time it already shows 25.00%. The dashed linear reference still begins at 0%.
Test negative progress and export the timing rule
Choose Custom cubic Bézier. Set X1, Y1, X2 and Y2 to 0.2, -0.5, 0.8 and 1.5. Set Time to 10%. The selected easing reads -7.84%, below the progress at the start of the curve.
Download easing-function.css. Apply one of its declarations to a real transition or animation and compare the motion. An interpolated property can limit values outside its range, so check the actual property whose movement you want to shape.
W3C CSS Easing Functions cubic Bézier timingW3C CSS Animations timing function
Common questions
Does progress always increase with elapsed time?
Cubic Bézier Y control points can make progress go backward for part of the timeline. The X coordinates still represent nondecreasing elapsed time.
Why does jump-none need at least two steps?
It omits jumps at both ends. One step would leave no jump intervals for the function to advance through.