Can css3 only realize animation once?
Today, I would like to share with you whether css3 can only achieve one animation, detailed content and clear logic. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Css3 can not only animate once; you can use the "animation-iteration-count" property to define the number of times the animation is played. When the property value is set to infinite, the number of times to play is unlimited, and the syntax is "animation-iteration-count: times of playback".
The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.
Can css3 only animate once?
Css3 can only animate once.
You can use animation-iteration-count.
The animation-iteration-count property defines how many times the animation should be played. The default value is one.
Grammar
Animation-iteration-count: value
N A number that defines how many times the animation should be played
Infinite specifies that the animation should be played indefinitely (forever)
Examples are as follows:
123The div {width:100px;height:100px;background:red;position:relative;animation:mymove 3s top:0px; top:0px; to top:200px;} @-webkit-keyframes mymove / * Safari and Chrome * / {from {top:0px;} to {top:200px;}} @ keyframes mymove
Note: Internet Explorer 9 and earlier IE browsers do not support the animation-iteration-count attribute.
Output result:
These are all the contents of the article "whether css3 can only animate once". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.