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
You can create a transition by simply defining how long the transition should last. This is called the transition duration.
Resources
Video review
- Transitions can alter the appearance of an element when a state change happens.
- In order to transition a property, you need a start value and an end value.
- The
transition-duration
property is a required property for CSS transitions. -
transition-duration
sets the length of time of the transition; the property accepts a time unit of seconds or milliseconds.
To specify a duration in milliseconds, add a period before the number value. For example:
transition-duration: .4s;
Sometimes you may see millisecond values defined using the ms
CSS time unit. For instance, the value .4s
is equivalent to:
transition-duration: 400ms;
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