Home > Article > Web Front-end > 8 properties of CSS3 animation (Animation) that you must master
Must be used in conjunction with the rule @keyframes, eg:@keyframes animations animation-name:animations;
animation-duration:3s; Animation completed The time used is 3s
linear: linear transition. Equivalent to Bezier curve (0.0, 0.0, 1.0, 1.0)
ease: smooth transition. Equivalent to Bezier curve (0.25, 0.1, 0.25, 1.0)
ease-in: from slow to fast. Equivalent to Bezier curve (0.42, 0, 1.0, 1.0)
ease-out: from fast to slow. Equivalent to Bezier curve (0, 0, 0.58, 1.0)
ease-in-out: from slow to fast and then to slow. Equivalent to Bezier curve (0.42, 0, 0.58, 1.0)
step-start: Equivalent to steps(1, start)
step-end: Equivalent to steps(1, end )
steps(<integer>[, [ start | end ] ]?): A step function that accepts two parameters. The first parameter must be a positive integer specifying the number of steps of the function. The value of the second parameter can be start or end, specifying the time point when the value of each step changes. The second parameter is optional and the default value is end.
cubic-bezier(
animation-delay:0.5s; The delay time before the animation starts is 0.5s
animation -iteration-count: infinite | number;
infinite: infinite loop
number: number of loops
normal: normal direction
reverse: run in the reverse direction
alternate: the animation runs normally and then in the reverse direction, and continues to alternate Run
alternate-reverse: The animation first runs in the reverse direction and then runs in the forward direction, and continues to run alternately
animation-play-state:running | paused;
running:motion
paused: pause
animation-play-state:paused; When the mouse The animation stops when it passes, and the animation continues when the mouse moves away
none: default value , do not set the state of the object outside of the animation
forwards: Set the object state to the state at the end of the animation
backwards: Set the object state to the state at the beginning of the animation
both :Set the object state to the state when the animation starts or ends
[Related recommendations]
1. Detailed introduction to the animation-direction attribute in CSS3
2. Share an example of monitoring the css3 animation (animation) end event
3. Use the animation attribute to implement delayed execution between loops tutorial
4. Detailed explanation of the two pause methods (transition, animation) in css3
The above is the detailed content of 8 properties of CSS3 animation (Animation) that you must master. For more information, please follow other related articles on the PHP Chinese website!