Home  >  Article  >  Web Front-end  >  What is the difference between transition and animation in css3

What is the difference between transition and animation in css3

王林
王林Original
2020-11-11 16:43:175119browse

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.

What is the difference between transition and animation in css3

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn