<animateTransform>

animateTransform 元素在其目標元素上設定動畫變換屬性,從而允許動畫控制平移、縮放、旋轉和/或傾斜。

使用上下文

類別動畫元素
允許的內容任意數量的以下元素,按任意順序
描述性元素

示例

html
<svg
  width="120"
  height="120"
  viewBox="0 0 120 120"
  xmlns="http://www.w3.org/2000/svg">
  <polygon points="60,30 90,90 30,90">
    <animateTransform
      attributeName="transform"
      attributeType="XML"
      type="rotate"
      from="0 60 70"
      to="360 60 70"
      dur="10s"
      repeatCount="indefinite" />
  </polygon>
</svg>

屬性

DOM 介面

此元素實現了 SVGAnimateTransformElement 介面。

規範

規範
SVG 動畫級別 2
# AnimateTransformElement

瀏覽器相容性

BCD 表格僅在瀏覽器中載入