dur
示例
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"
repeatCount="indefinite" />
</rect>
<rect x="120" y="0" width="100" height="100">
<animate
attributeType="XML"
attributeName="y"
from="0"
to="50"
dur="3s"
repeatCount="indefinite" />
</rect>
</svg>
使用說明
| 值 |
<clock-value> | media | indefinite |
|---|---|
| 預設值 | indefinite |
| 可動畫 | 否 |
<clock-value>-
此值指定簡單持續時間的長度。該值必須大於 0,並且可以用小時 (
h)、分鐘 (m)、秒 (s) 或毫秒 (ms) 表示。可以組合這些時間表示形式以建立一些複雜的持續時間,例如hh:mm:ss.iii或mm:ss.iii。 media-
此值將簡單持續時間指定為內在媒體持續時間。這僅對定義媒體的元素有效。(對於 動畫元素,如果指定了
media,則將忽略該屬性。) indefinite-
此值將簡單持續時間指定為無限。
規範
| 規範 |
|---|
| SVG 動畫級別 2 # DurAttribute |
瀏覽器相容性
BCD 表格僅在瀏覽器中載入