CSS Transition Timing Function
The transition-timing-function property defines the acceleration curve of a transition. It determines how the intermediate values of the CSS properties being affected are calculated. In simpler terms, it controls the speed of the transition over its duration.
Standard Keywords
CSS provides several predefined keywords that represent common easing curves:
- ease: (Default) Starts slowly, accelerates sharply, and then slows down towards the end.
- linear: Constant speed from start to end. No acceleration.
- ease-in: Starts slowly and accelerates.
- ease-out: Starts quickly and decelerates.
- ease-in-out: Starts slowly, accelerates in the middle, and slows down at the end.
Custom Control: Cubic Bezier
For precise control, you can define your own curve using cubic-bezier(n,n,n,n). The values range from 0 to 1, representing control points on a Bezier curve. Values outside this range can create bouncing or elastic effects.
Discrete Steps
The steps() function allows you to break the transition into a specific number of intervals, creating a jumpy or frame-by-frame animation rather than a smooth flow.
