HTML DOM Style animationIterationCount Property
-- Learning is not just about technology, but also about dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
JavaScript Reference Manual
JavaScript Objects
- JavaScript Array Object
- JavaScript Boolean Object
- JavaScript Date Object
- JavaScript Math Object
- JavaScript Number Object
- JavaScript String Object
- JavaScript RegExp Object
- JavaScript Global Properties/Functions
- JavaScript Operators
- JavaScript Error
Browser Objects
DOM Objects
- HTML DOM Document Object
- HTML DOM Element Object
- HTML DOM Attribute Object
- HTML DOM Event Object
- HTML DOM Console Object
- CSSStyleDeclaration Object
- DOM HTMLCollection
HTML Objects
- <a>
- <area>
- <audio>
- <base>
- <blockquote>
- <body>
- <button>
- <canvas>
- <col>
- <colgroup>
- <datalist>
- <del>
- <details>
- <dialog>
- <embed>
- <fieldset>
- <form>
- <iframe>
- <frameset >
- <img>
- <ins>
- <input> - button
- <input> - checkbox
- <input> - color
- <input> - date
- <input> - datetime
- <input> - datetime-local
- <input> - email
- <input> - file
- <input> - hidden
- <input> - image
- <input> - month
- <input> - number
- <input> - range
- <input> - password
- <input> - radio
- <input> - reset
- <input> - search
- <input> - submit
- <input> - text
- <input> - time
- <input> - url
- <input> - week
- <keygen>
- <link>
- <label>
- <legend>
- <li>
- <map>
- <menu>
- <menuItem>
- <meta>
- <meter>
- <object>
- <ol>
- <optgroup>
- <option>
- <param>
- <progress>
- <q>
- <script>
- <select>
- <source>
- <style>
- <table>
- <td>
- <th>
- <tr>
- <textarea>
- <title>
- <time>
- <track>
- <video>
Style animationIterationCount Property
Example
Change the animationIterationCount property of the <div> element:
document.getElementById("myDIV").style.animationIterationCount="infinite";
Definition and Usage
The animationIterationCount property sets or returns the number of times an animation should be played.
Browser Support
Only Firefox supports the animationIterationCount property.
Syntax
Get the animationIterationCount property:
_object_.style.animationIterationCount
Set the animationIterationCount property:
_object_.style.animationIterationCount="_number_|infinite|initial|inherit"
Property Values
| Value | Description |
|---|---|
| _number_ | A number that defines the number of times an animation should be played. Default value is 1. |
| infinite | Specifies that the animation should be played infinite times (forever). |
| initial | Sets this property to its default value. Read about initial. |
| inherit | Inherits this property from its parent element. Read about inherit. |
Technical Details
| Default value: | 1 |
| Return value: | A string, representing the animation-iteration-count property of an element. |
| CSS Version: | CSS3 |
Related Articles
CSS Reference: animation-iteration-count Property
YouTip