To create a transition effect, you must specify two things: the CSS property you want to add an effect to the duration of the effect.
The transition effect will start when the specified CSS property changes value.
The transition-timing-function property specifies the speed curve of the transition effect.
The transition-timing-function property can have the following values: ease - specifies a transition effect with a slow start, then fast, then end slowly, linear - specifies a transition effect with the same speed from start to end, ease-in - specifies a transition effect with a slow start, ease-out - specifies a transition effect with a slow end, ease-in-out - specifies a transition effect with a slow start and end, cubic-bezier(n,n,n,n) - lets you define your own values in a cubic-bezier function.
The transition-delay property specifies a delay for the transition effect.
The CSS transition properties can be specified one by one, like this:
div { transition-property: width; transition-duration: 2s; transition-timing-function: linear; transition-delay: 1s; }
or by using the shorthand property transition.
Note: If the duration part is not specified, the transition will have no effect, because the default value is 0.