Transitions Flashcards
4 aspects controlled in CSS transitions
1) Which CSS properties transition
2) How long a transition lasts
3) How much time there is before a transition begins
4) How a transition accelerates
transition-property
Declares which property of the element is going to transition
transition-duration
Declares how long the property should take to transition
Duration is specified in seconds or milliseconds, such as 3s, 0.75s, 500ms. The default value is 0s, or instantaneous, as if there is no transition.
transition-delay
Delay specifies the time to wait before starting the transition.
As with the duration property, the default value for transition-delay is 0s, which means no delay.
transition-timing-function
Describes the pace of the transition
There are a bunch of predefined values, you can find here: https://developer.mozilla.org/en-US/docs/Web/CSS/transition-timing-function
transition (property)
This shorthand property describes each aspect of the transition puzzle in a single declaration.
The properties must be specified in this order:
transition-property, transition-duration, transition-timing-function, transition-delay.
transition-property: all
This will apply the same values to all properties.
all means every value that changes will be transitioned in the same way. You can use all with the separate transition properties, or the shorthand syntax.