search
HomeWeb Front-endHTML TutorialExplanation of corresponding properties of css3 animation animation_html/css_WEB-ITnose

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;  }}

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


Statement
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
What is the purpose of the <datalist> element?What is the purpose of the <datalist> element?Mar 21, 2025 pm 12:33 PM

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What is the purpose of the <progress> element?What is the purpose of the <progress> element?Mar 21, 2025 pm 12:34 PM

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

What is the purpose of the <meter> element?What is the purpose of the <meter> element?Mar 21, 2025 pm 12:35 PM

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

What is the viewport meta tag? Why is it important for responsive design?What is the viewport meta tag? Why is it important for responsive design?Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What is the purpose of the <iframe> tag? What are the security considerations when using it?What is the purpose of the <iframe> tag? What are the security considerations when using it?Mar 20, 2025 pm 06:05 PM

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

How do I use the HTML5 <time> element to represent dates and times semantically?How do I use the HTML5 <time> element to represent dates and times semantically?Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

How do I use HTML5 form validation attributes to validate user input?How do I use HTML5 form validation attributes to validate user input?Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What are the best practices for cross-browser compatibility in HTML5?What are the best practices for cross-browser compatibility in HTML5?Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

See all articles

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 agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.