CSS 3 Animation 2D

Source: Internet
Author: User

Animation is divided into two, 1, each frame animation animation is a frame 2, keyframe animation, to determine the key frame of the computer will automatically over

If you encounter an incompatibility problem in the animation, you also want to prefix

@-webkit-keyframes Rule @-webkit-animation Property

Keyframe Animation: @keyframes + animation name

The last frame of the first frame

From: First frame animation
To: Last frame animation

@keyframes donghua{

from {
width:100px;height:100px;
}
to {
width:20px;height:200px
}

keyframe Animation: @keyframes + animation name

Setting keyframes in the form of progress
@keyframes myanimation{
0%{width:50px; height:100px}
50%{width:100px;height:100px}
100%{width:100px;height:200px}
}

Invoke animation

To invoke an optional property of an animation

(3) Setting the animation delay time
Animation-delay:1s;

(4) Set the direction of the animation direction
Normal: Default direction
Reverse: Invert
Alternate: Successive inversion

Animation-direction:alternate;

(5) Set the number of times the animation executes iteration
Trigger an animation execution condition and keep the condition
Infinite: Unlimited or digital

Animation-iteration-count:1;


(6) Set the fill state before and after the element plays
None: Default value;
Backwards: The same state as the first frame before the element animation is set
Forwards: Sets the state of the element after the animation is complete and the last frame is the same
Both:backwards+forwards

Animation-fill-mode:both;

(7) Controlling the state of element animation playback
Running: execution;
Paused: Pause

animation-play-state:paused;

(8) control the animation to play the form of motion
animation-timing-function:ease-in;

Linear uniform

Ease buffering

Ease-in from slow to fast

Ease-out from fast to slow

Ease-in-out from slow to fast and slow

CSS 3 Animation 2D

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.