Table of Contents
animation composite properties. Retrieves or sets the animation effects applied to the object. " >animation composite properties. Retrieves or sets the animation effects applied to the object.
If there are multiple attribute values ​​separated by ",", it applies to all elements, including pseudo objects :after and :before" >If there are multiple attribute values ​​separated by ",", it applies to all elements, including pseudo objects :after and :before
1.animation-name Retrieve or set the animation name applied to the object " >1.animation-name Retrieve or set the animation name applied to the object
2.animation-duration Retrieve or set the duration of the object animation" >2.animation-duration Retrieve or set the duration of the object animation
3.animation-timing-function Retrieve or set the transition type of object animation" >3.animation-timing-function Retrieve or set the transition type of object animation
4.animation-delay Retrieve or set the object animation delay time" >4.animation-delay Retrieve or set the object animation delay time
6.animation-direction Retrieve or set the object animation Whether to move in the reverse direction during the loop" >6.animation-direction Retrieve or set the object animation Whether to move in the reverse direction during the loop
8.animation-fill-mode Retrieve or set the state of the object outside the animation time" >8.animation-fill-mode Retrieve or set the state of the object outside the animation time
Home Web Front-end CSS Tutorial 8 properties of CSS3 animation (Animation) that you must master

8 properties of CSS3 animation (Animation) that you must master

May 18, 2017 pm 02:36 PM

animation composite properties. Retrieves or sets the animation effects applied to the object.

If there are multiple attribute values ​​separated by ",", it applies to all elements, including pseudo objects :after and :before

1.animation-name Retrieve or set the animation name applied to the object

Must be used in conjunction with the rule @keyframes, eg:@keyframes animations animation-name:animations;

2.animation-duration Retrieve or set the duration of the object animation

animation-duration:3s; Animation completed The time used is 3s

3.animation-timing-function Retrieve or set the transition type of object animation

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(, , , ): A specific Bezier curve type, the 4 values ​​​​must be in the [0, 1] interval Inside

4.animation-delay Retrieve or set the object animation delay time

animation-delay:0.5s; The delay time before the animation starts is 0.5s

5.animation-iteration-count Retrieve or set the cyclenumber of times

animation -iteration-count: infinite | number;

infinite: infinite loop

number: number of loops

6.animation-direction Retrieve or set the object animation Whether to move in the reverse direction during the loop

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

7.animation-play-state Retrieve or set the state of the object animation

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

8.animation-fill-mode Retrieve or set the state of the object outside the animation time

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to speed up animation effects in Windows 11: 2 methods explained How to speed up animation effects in Windows 11: 2 methods explained Apr 24, 2023 pm 04:55 PM

When Microsoft launched Windows 11, it brought a lot of changes. One of the changes is an increase in the number of user interface animations. Some users want to change the way things appear, and they have to find a way to do it. Having animations makes it feel better and more user-friendly. Animation uses visual effects to make the computer look more attractive and responsive. Some of them include sliding menus after a few seconds or minutes. There are many animations on your computer that can affect PC performance, slow it down, and interfere with your work. In this case you have to turn off animation. This article will introduce several ways that users can improve the speed of their animations on PC. You can apply the changes using Registry Editor or a custom file you run. How to improve animations in Windows 11

How to use CSS to achieve the rotating background animation effect of elements How to use CSS to achieve the rotating background animation effect of elements Nov 21, 2023 am 09:05 AM

How to use CSS to implement rotating background image animation effects of elements. Background image animation effects can increase the visual appeal and user experience of web pages. This article will introduce how to use CSS to achieve the rotating background animation effect of elements, and provide specific code examples. First, we need to prepare a background image, which can be any picture you like, such as a picture of the sun or an electric fan. Save the image and name it "bg.png". Next, create an HTML file and add a div element in the file, setting it to

How to rename properties of JSON using Gson in Java? How to rename properties of JSON using Gson in Java? Aug 27, 2023 pm 02:01 PM

The Gson@SerializedName annotation can be serialized to JSON and have the provided name value as its field name. This annotation can override any FieldNamingPolicy, including the default field naming policy that may have been set on the Gson instance. Different naming strategies can be set using the GsonBuilder class. Syntax@Retention(value=RUNTIME)@Target(value={FIELD,METHOD})public@interfaceSerializedNameExample importcom.google.gson.annotations.*;

How to get integer literal properties in Python without SyntaxError? How to get integer literal properties in Python without SyntaxError? Aug 20, 2023 pm 07:13 PM

TogetintliteralattributeinsteadofSyntaxError,useaspaceorparenthesis.TheintliteralisapartifNumericLiteralsinPython.NumericLiteralsalsoincludesthefollowingfourdifferentnumericaltypes−int(signedintegers)−Theyareoftencalledjustintegersorints,arepositiveo

Python's dir() function: View the properties and methods of an object Python's dir() function: View the properties and methods of an object Nov 18, 2023 pm 01:45 PM

Python's dir() function: View an object's properties and methods, specific code example required Summary: Python is a powerful and flexible programming language, and its built-in functions and tools provide developers with many convenient features. One of the very useful functions is the dir() function, which allows us to view the properties and methods of an object. This article will introduce the usage of the dir() function and demonstrate its functions and uses through specific code examples. Text: Python’s dir() function is a built-in function.

What to do if Win11 disk properties are unknown What to do if Win11 disk properties are unknown Jul 03, 2023 pm 04:17 PM

What should I do if the disk properties of Win11 are unknown? Recently, Win11 users found that the system prompted a disk error when using their computers. What is going on? And how to solve it? Many friends don’t know how to operate in detail. The editor has compiled the steps to solve the Win11 disk error below. If you are interested, follow the editor to read below! Steps to solve Win11 disk error 1. First, press the Win+E key combination on the keyboard, or click the File Explorer on the taskbar; 2. In the right sidebar of the File Explorer, find the side and right-click the local disk (C :), in the menu item that opens, select Properties; 3. Local disk (C:) Properties window, switch to Tools

What is the role of pageXOffset attribute in JavaScript? What is the role of pageXOffset attribute in JavaScript? Sep 16, 2023 am 09:17 AM

If you want to get the pixels to which the document is scrolled from the upper left corner of the window, use the pageXoffset and pageYoffset properties. Use pageXoffset for horizontal pixels. Example You can try running the following code to learn how to use the pageXOffset attribute in JavaScript - Live Demonstration<!DOCTYPEhtml><html> <head> <style> &amp

bottom attribute syntax in CSS bottom attribute syntax in CSS Feb 21, 2024 pm 03:30 PM

Bottom attribute syntax and code examples in CSS In CSS, the bottom attribute is used to specify the distance between an element and the bottom of the container. It controls the position of an element relative to the bottom of its parent element. The syntax of the bottom attribute is as follows: element{bottom:value;} where element represents the element to which the style is to be applied, and value represents the bottom value to be set. value can be a specific length value, such as pixels

See all articles