css 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] cycle

count

UK[kaʊnt] US[kaʊnt]

n.Total number; count; count; argument

v. Count; calculate the total; count...; important

Third person singular: counts Plural: counts Present participle: counting Past tense: counted Past participle: counted

css animation-iteration-count attributesyntax

How to use the animation-iteration-count attribute?

The animation-iteration-count attribute is used to define the number of animation playback times; setting the value of the animation-iteration-count attribute to infinite allows for infinite loop playback of the animation.

Function: 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.

css 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

Home

Videos

Q&A