<animateTransform> SVG 元素对其目标元素的变换属性做动画,从而让动画可以控制平移、缩放、旋转或倾斜。
使用上下文
示例
<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>
示例
属性
- by
- from
- to
- type
DOM 接口
该元素实现了 SVGAnimateTransformElement 接口。
规范
浏览器兼容性
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
