repeatCount
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Das repeatCount
Attribut gibt an, wie oft eine Animation durchgeführt wird.
Dieses Attribut kann mit den folgenden SVG-Elementen verwendet werden:
Beispiel
<svg viewBox="0 0 220 150" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="100" height="100">
<animate
attributeType="XML"
attributeName="y"
from="0"
to="50"
dur="1s"
repeatCount="5" />
</rect>
<rect x="120" y="0" width="100" height="100">
<animate
attributeType="XML"
attributeName="y"
from="0"
to="50"
dur="1s"
repeatCount="indefinite" />
</rect>
</svg>
Verwendungshinweise
Wert | <number> | indefinite |
---|---|
Standardwert | Keiner |
Animationsfähig | Nein |
<number>
-
Dieser Wert spezifiziert die Anzahl der Wiederholungen. Er kann Teilwiederholungen enthalten, die als Bruchwerte ausgedrückt werden. Ein Bruchwert beschreibt einen Teil der einfachen Dauer. Die Werte müssen größer als
0
sein. indefinite
-
Dieser Wert gibt an, dass die Animation unbegrenzt wiederholt wird (d.h. bis das Dokument endet).
Spezifikationen
Specification |
---|
SVG Animations Level 2 # RepeatCountAttribute |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
repeatCount |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support