Latest web development tutorials

HTML DOM Style animationIterationCount property

Style Object Reference Style Objects

Examples

Change the <div> element animationIterationCount attributes:

document.getElementById("myDIV").style.animationIterationCount="infinite";

try it"

Definition and Usage

animationIterationCount property sets or returns any animation.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Only Firefox supports animationIterationCount property.


grammar

Back animationIterationCount properties:

object .style.animationIterationCount

Setting animationIterationCount properties:

object .style.animationIterationCount="number|infinite|initial|inherit"

Property Value

描述
number 一个定义动画播放次数的数字。默认值为 1。
infinite 规定动画播放无限次(永远)。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

technical details

Defaults: 1
return value: String representing the animation-iteration-count property element.
CSS version CSS3


related articles

CSS Reference Manual: Animation-Iteration-COUNT property


Style Object Reference Style Objects