重複持續時間
repeatDur 屬性指定重複動畫的總時長。
你可以將此屬性與以下 SVG 元素一起使用
示例
html
<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"
repeatDur="5s" />
</rect>
<rect x="120" y="0" width="100" height="100">
<animate
attributeType="XML"
attributeName="y"
from="0"
to="50"
dur="1s"
repeatDur="indefinite" />
</rect>
</svg>
用法說明
| 值 |
<clock-value> | indefinite |
|---|---|
| 預設值 | None |
| 可動畫的 | 否 |
<clock-value>-
此值指定動畫重複的演示時間。
indefinite-
此值表示動畫將無限重複(即,直到文件結束)。
規範
| 規範 |
|---|
| SVG 動畫級別 2 # RepeatDurAttribute |