The difference between transition and animation in css3 is that transition needs to trigger an event to change its CSS properties over time; animation can also change element CSS over time without triggering any events. Attributes.
The animation attribute is similar to the transition. They all change the attribute value of the element over time. The main difference is:
(Learning video Share:css video tutorial)
Transition needs to trigger an event to change its CSS properties over time; animation can also be explicitly changed without triggering any event. Time changes to change the CSS properties of elements to achieve an animation effect.
1) Animation does not require event triggering, transition does.
2) There is only one set of transitions (two: start-end) keyframes, and multiple animations can be set.
Related recommendations:CSS tutorial
The above is the detailed content of What is the difference between transition and animation in css3. For more information, please follow other related articles on the PHP Chinese website!