Home > Web Front-end > CSS Tutorial > What is animation in css

What is animation in css

王林
Release: 2020-11-30 15:12:55
Original
6052 people have browsed it

Animation in css is an abbreviation attribute, used to set animation attributes, such as [animation-duration], which specifies the time it takes to complete the animation. This attribute must be specified, otherwise the animation duration will be 0 and cannot be played.

What is animation in css

The operating environment of this tutorial: Windows 10 system, CSS3, this article is applicable to all brands of computers.

animation attribute is an abbreviated attribute used to set six animation attributes:

(Learning video recommendation: css video tutorial)

animation-name
animation-duration
animation-timing-function
animation-delay
animation-iteration-count
animation-direction
Copy after login

Comment : Please always specify the animation-duration attribute, otherwise the duration will be 0 and the animation will not be played.

Syntax:

animation: name duration timing-function delay iteration-count direction;
Copy after login

animation-name specifies the keyframe name that needs to be bound to the selector. .​

animation-duration Specifies the time it takes to complete the animation, in seconds or milliseconds.

animation-timing-function Specifies the speed curve of animation.

animation-delay Specifies the delay before the animation starts.

animation-iteration-count Specifies the number of times the animation should be played.

animation-direction Specifies whether the animation should be played in reverse in turn.

Example:

Use abbreviation attributes to bind animation to div elements:

div
{
animation:mymove 5s infinite;
-webkit-animation:mymove 5s infinite; /* Safari 和 Chrome */
}
Copy after login

Related recommendations:CSS tutorial

The above is the detailed content of What is animation in css. 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