如何使svg HTML动画不断重复?
它将只执行一个动画并停止 有什么想法吗如何使svg HTML动画不断重复?,html,animation,svg,Html,Animation,Svg,它将只执行一个动画并停止 有什么想法吗 谢谢 我相信,要想让它发挥作用,您需要使用 repeatCount='0' repeatCount="indefinite" 然后,当其他动画停止时,每个动画都将开始。使用;给动画一个两个起点动画在不同浏览器之间仍然没有一致的行为。您可以尝试添加@Adam Moseley建议的repeatCount='0',这应该可以在Firefox中使用。您还需要在第二个中添加id,以便在第一个中使用begin=“0s;two.end”,以便在第二个完成后再次启动。
谢谢 我相信,要想让它发挥作用,您需要使用 repeatCount='0'
repeatCount="indefinite"
然后,当其他动画停止时,每个动画都将开始。使用;给动画一个两个起点动画在不同浏览器之间仍然没有一致的行为。您可以尝试添加@Adam Moseley建议的
repeatCount='0'
,这应该可以在Firefox中使用。您还需要在第二个
中添加id
,以便在第一个
中使用begin=“0s;two.end”
,以便在第二个
完成后再次启动。
repeatCount="indefinite"
<animate id="one" attributeName="y" from="-21.713" to="10" begin="0s; two.end" dur="2s" fill="freeze" repeatCount="indefinite" />
<animate id="two" attributeName="y" from="10" to="-21.713" begin="one.end" dur="2s" fill="freeze" repeatCount="indefinite" />