repeatDur

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
默认值
可变性
<clock-value>

该值指定重复动画的呈现时间的持续时间。

indefinite

该值表示动画将无限期重复(即直到文档结束)。

规范

Specification
SVG Animations Level 2
# RepeatDurAttribute