What is the difference between transition and animation in css3

王林
Release: 2020-11-17 16:34:37
Original
5163 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template