【发布时间】:2021-03-21 02:03:57
【问题描述】:
如何更改 SVG 中动画过渡的持续时间以使动画加速或减速?我尝试了以下,dur 属性会发生变化。
<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">
<animate attributeType="XML" attributeName="dur" values="10s;5s;1s" dur="3s" />
</animateTransform>
</polygon>
</svg>
这最终不起作用。
我不能为此目的使用 javascript(只想使用纯 svg)。
有什么建议吗?
【问题讨论】: