Home > Article > Web Front-end > Is css3 animation a software?
css3 animation is not software. CSS animation is to gradually change elements from one style to another. It is realized through CSS and HTML language; the essence of CSS animation is that the animation properties can gradually change from one style to another. When a value changes to another value, the animation attribute can be used in conjunction with the animation attribute to achieve CSS animation effects.
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
CSS can animate HTML elements without using JavaScript or Flash! .
What is CSS animation
Animation makes an element gradually change from one style to another.
You can change as many CSS properties as you like.
To use CSS animation, you must first assign some keyframes to the animation.
Keyframes contain the style that an element has at a specific time.
Some CSS properties are animatable, which means they can be used for animations and transitions.
Animated properties can gradually change from one value to another, such as size, quantity, percentage, and color.
@keyframes Rules
If you specify a CSS style in the @keyframes rule, the animation will gradually change from the current style to the new style at a specific time.
For animation to take effect, the animation must be bound to an element.
The following example binds the "example" animation to the
<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 100px; background-color: red; animation-name: example; animation-duration: 4s; } @keyframes example { from {background-color: red;} to {background-color: yellow;} } </style> </head> <body> <p><b>注释:</b>本例在 Internet Explorer 9 以及更早的版本中无效。</p> <div></div> <p><b>注释:</b>当动画结束后,会变回最初的样式。</p> </body> </html>
Output:
(Learning video sharing: cssvideo tutorial, html video tutorial)
The above is the detailed content of Is css3 animation a software?. For more information, please follow other related articles on the PHP Chinese website!