First, transition syntax:
Transition: [<transition-property>| | <transition-duration>| | <transition-timing-function>| | <transition-delay>| | <transition-property>| | <transition-duration>| | <transition-timing-function>| | <transition-delay>]
The transition consists of four attribute values: The Transition-property of the properties of the transformation, the time transition-duration of the Transformation, and the duration of the continuation period. The rate change of the transformation transition-timing-function, the transformation delay time transition-delay.
1. Changing properties: Transition-property
none | All | [<ident>] [', ' <ident>]*;
Transition-property is used to specify that when one of the attributes of an element is changed, the transition effect is performed, where none has no property change; All properties are changed, it is also the default, and the corresponding type of the indent element attribute is as follows:
2, Animation time: Transition-duration
<time> [, time]*;
Transition-duration is the time of the animation execution, in S (s), such as 0.1 seconds can be written as "0.1s" or ". 1s", which can act on any element, including: Before and: after pseudo-elements.
3, the way of animation execution: Transition-timing-function
Ease | Linear | ease-in | Ease-out | Ease-in-out;
Ease: Gradually slow down, linear: constant speed, ease-in: From slow to fast, ease-out: from fast to slow, ease-in-out: Slow first to fast to slow.
4, animation delay: Transition-delay
<time> [, time]*;
Transition-delay is used to specify the time at which an animation starts executing, that is, how long it takes to start the transition animation effect after changing the attribute value of the element, and the value is the same as transition-duration.
CSS3 Transition Animation Basics