css transition reverse code example
Example 1: animation-direction property
animation-direction can have the following values -
(1) normal : forward direction, this is the default value.
(2) reverse : the animation sets in the reverse direction ( backward ).
(3) alternate : the animation plays normal first and then reverse.
(4) alternate-reverse: the animation plays reverse first and then normal.
NOTE: animation-duration also matters in animation-direction.
Example 2: css transform transition
.selector {
transition: transform 1s;
}