css3 animation-iteration-count attribute
Translation results:
animation
英[ˌænɪˈmeɪʃn] 美[ˌænəˈmeʃən]
n. Angry, lively; cartoon production, cartoon shooting; [film and television] animation
Plural: animations
iteration
## English[ˌɪtəˈreɪʃn] US[ˌɪtəˈreʃən] n. Repeat; restate; restate thing; [computer] cyclecount
UK[kaʊnt] US[kaʊnt] n.Total number; count; count; argument v. Count; calculate the total; count...; importantThird person singular: counts Plural: counts Present participle: counting Past tense: counted Past participle: countedcss3 animation-iteration-count attributesyntax
Function:The animation-iteration-count attribute defines the number of times the animation is played.
Syntax: animation-iteration-count: n|infinite;
Description: n Defines the number of animation playback times. infinite specifies that the animation should be played infinitely.
Note: Internet Explorer 9 and earlier versions do not support the animation-iteration-count property.
Infinite loop playback can be done by setting the value of the animation-iteration-count attribute in CSS3 to infinite. You can also customize the animation playback times
css3 animation-iteration-count attributeexample
<!DOCTYPE html>
<html>
<head>
<style>
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove 3s;
animation-iteration-count:3;
/* Safari and Chrome */
-webkit-animation:mymove 3s;
-webkit-animation-iteration-count:3;
}
@keyframes mymove
{
from {top:0px;}
to {top:200px;}
}
@-webkit-keyframes mymove /* Safari and Chrome */
{
from {top:0px;}
to {top:200px;}
}
</style>
</head>
<body>
<p><strong>注释:</strong>Internet Explorer 9 以及更早的版本不支持 animation-iteration-count 属性。</p>
<div></div>
</body>
</html>Run instance »
Click the "Run instance" button to view the online instance
