Home > Web Front-end > HTML Tutorial > Explanation of corresponding properties of css3 animation animation_html/css_WEB-ITnose

Explanation of corresponding properties of css3 animation animation_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:48:55
Original
1497 people have browsed it

animation

Value: [ || || || || || || ] [, [ || || || || || || ] ]*


animation-timing-function:

Define the speed curve of the animation

ease: The animation starts at a low speed, then speeds up, before ending Slow down.

linear: constant speed

ease-in: animation starts at low speed

ease-out: animation ends at low speed

ease-in-out: animation Start and end at low speed, which is slower than ease and has a more even speed

step-start: Display frame by frame according to keyframes settings, the first frame is the first frame set by keyframes.

step-end: Display frame by frame according to keyframes settings. The first frame is the initial value of the style.

steps([, [ start | end ] ]?): Divide one frame set in keyframes into several frames, start is the first time to display the first frame, end is the first time Display the initial value of the style, for example: steps(4,start)

cubic-bezier(, , , ): in the cubic-bezier function in its own value. Possible values ​​are numeric values ​​from 0 to 1. The Bezier curve limits the positions of the first and last control points. By adjusting the positions of the middle two control points, commonly used animation effects can be flexibly obtained


animation-iteration-count

The number of animation iterations, the default is 1, you can set it to 2, 3, 4 times,...infinite means unlimited


animation-duration

refers to the duration of an animation cycle. The unit is seconds or milliseconds ms.


animatin-delay

refers to the animation delay execution time. Unit seconds s or milliseconds ms.


animation-direction

refers to the direction in which frames advance on the animation timeline.

normal: the default value, which means going straight forward and returning to the first frame after the last frame.

reverse: opposite to the running direction of normal

alternate: forward After playing, then rewind, rewind to the end and then play back

alternate-reverse: opposite to the running direction of alternate


animation-fill-mode

Set the state after animation ends

none: Default value. Do not set the state other than the object animation, the DOM state before animation

forwards: Set the object state to the state at the end of the animation, 100% or to, when the animation-direction is set to reverse, after the animation ends Displayed as the first frame of keyframes

backwards: Set the object state to the state when the animation starts, (test shows the DOM state before animation)

both: Set the object state to the end or start of the animation state, the state takes priority at the end


animation-play-state

paused: Set this attribute to pause the animation

running: Set this attribute to continue playing the animation

Animation running status, pause or continue playing, the attributes are: running (default) and paused. When is this useful? Use animation to achieve video playback effects. Time


Browser support (webkit kernel browsers need to be prefixed with "-webkit-"):



Simple example:

div {  animation-name: diagonal-slide;  animation-duration: 5s;  animation-iteration-count: 10;}@keyframes diagonal-slide {  from {	left: 0;	top: 0;  }  to {	left: 100px;	top: 100px;  }}
Copy after login

References :

http://www.w3.org/TR/2012/WD-css3-animations-20120403/

Tips: CSS3 animation gradually realizes the little-by-little waiting prompt effect

Let’s talk about CSS3 animation to realize the loading animation


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