Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使svg HTML动画不断重复?_Html_Animation_Svg - Fatal编程技术网

如何使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" />