Home >Web Front-end >Front-end Q&A >What are the types of css3 animations?
There are three types of css3 animations: 1. Gradient animation implemented using the transition attribute; 2. Transformation animation implemented using the transform attribute; 3. Custom animation implemented using the animation attribute and "@keyframes" rules.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
css
There are three main ways to implement animation. The first is: transition
to implement gradient animation, and the second is: transform
Transformation animation, the third type is: animation
To implement custom animation, let’s talk about the implementation of the three animations in detail.
Let’s first take a look at the properties of transition
:
The specific value of timing-function can be seen in the following table:
Value | Description |
---|---|
linear | Uniform speed (equal to cubic-bezier (0,0,1,1)) |
From slow to fast and then to slow again (cubic-bezier(0.25,0.1,0.25,1)) | |
Slowly becomes faster (equal to cubic-bezier(0.42,0,1,1)) | |
Slowly slow down (equal to cubic-bezier(0,0,0.58,1)) | |
First become fast and then slow (equal to cubic-bezier(0.42,0,0.58,1)), fade in and out effect | |
n ,n,n,n) | Define your own values in the cubic-bezier function. Possible values are values between 0 and 1|
The above is the detailed content of What are the types of css3 animations?. For more information, please follow other related articles on the PHP Chinese website!