Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
The speed of a transition can vary over its duration. The speed can accelerate and decelerate rapidly, or slowly, all based on a timing function we set. Timing functions are often called easing functions because they gradually set the pace of a transition to produce a more realistic transition effect.
Resources
- transition-timing-function - MDN
- Pure CSS Questionnaire β with easing
- Pure CSS Questionnaire β with no easing
Video review
- When we create a CSS transition, the transition follows an acceleration curve that has a set of time intervals.
- These intervals can speed up or slow down a transition.
- A timing function establishes the acceleration curve and defines the intervals where a transition speeds up and slows down.
- The default timing-function the browser applies to your transition is
ease
. - Each timing function keyword value is a shorthand for a more complex timing function created by a cubic bΓ©zier curve.
Common timing function keyword values
These keyword values determine what happens in between the beginning and end of a transition.
- ease - Starts gently, then speeds up
- linear - Maintains a linear motion, at a constant speed with no easing
- ease-in - Starts gradually and stops suddenly
- ease-out β Starts suddenly, then slows down at the end
- ease-in-out β Starts and stops gradually
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up