Collect for everyone @keyframes rules and all animationproperties. We all know that @keyframes means prescribed animation. Here is a practical case. To help everyone understand, let’s take a look.
Property Description CSS
@keyframes Specifies animation.
animation Shorthand property for all animation properties, except animation-play-state property.
animation-name specifies the name of @keyframes animation.
animation-duration specifies the seconds or milliseconds it takes for the animation to complete one cycle. The default is 0.
animation-timing-function Specifies the speed curve of the animation. The default is "ease".
animation-delay Specifies when the animation starts. The default is 0.
animation-iteration-count Specifies the number of times the animation is played. The default is 1.
animation-direction Specifies whether the animation will play in reverse in the next cycle. The default is "normal".
animation-play-state Specifies whether the animation is running or paused. The default is "running".
The following two examples set all animation properties:
OperaSafariChromeFirefoxInternet Explorer
Instance
Run myfirst animation and set all Attributes:
div
{ animation-name: myfirst; animation-duration: 5s; animation-timing-function: linear; animation-delay: 2s; animation-iteration-count: infinite; animation-direction: alternate; animation-play-state: running; /* Safari and Chrome: */ -webkit-animation-name: myfirst; -webkit-animation-duration: 5s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 2s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; -webkit-animation-play-state: running; }
I believe you have mastered the method after reading these cases. For more exciting information, please pay attention to the php Chinese websiteOthersrelated articles!
Related reading:
htmlSteps to achieve 3D suspension effect
How to use H5 to create fireworks particle effects
How to change the mouseover style without using CSS
The above is the detailed content of How to use CSS3 animation properties. For more information, please follow other related articles on the PHP Chinese website!

CSS Grid is a powerful tool for creating complex, responsive web layouts. It simplifies design, improves accessibility, and offers more control than older methods.

Article discusses CSS Flexbox, a layout method for efficient alignment and distribution of space in responsive designs. It explains Flexbox usage, compares it with CSS Grid, and details browser support.

The article discusses techniques for creating responsive websites using CSS, including viewport meta tags, flexible grids, fluid media, media queries, and relative units. It also covers using CSS Grid and Flexbox together and recommends CSS framework

The article discusses the CSS box-sizing property, which controls how element dimensions are calculated. It explains values like content-box, border-box, and padding-box, and their impact on layout design and form alignment.

Article discusses creating animations using CSS, key properties, and combining with JavaScript. Main issue is browser compatibility.

Article discusses using CSS for 3D transformations, key properties, browser compatibility, and performance considerations for web projects.(Character count: 159)

The article discusses using CSS gradients (linear, radial, repeating) to enhance website visuals, adding depth, focus, and modern aesthetics.

Article discusses pseudo-elements in CSS, their use in enhancing HTML styling, and differences from pseudo-classes. Provides practical examples.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Zend Studio 13.0.1
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
