如何循环SVG动画序列? [英] How to loop SVG animation sequence?

查看:54
本文介绍了如何循环SVG动画序列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 animationTransform 的序列:

<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0" to="30" begin="0s" dur="0.4s" fill="freeze"/>
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="30" to="0" begin="0.4s" dur="0.4s" fill="freeze"/>

是否可以在不使用脚本的情况下循环此序列?

If it possible to loop this sequence without using script?

我可以通过使用 repeatCount="indefine" 将单个动画设置为循环,因为我想按顺序循环整个序列.

I can set individual animation to loop by using repeatCount="indefinite" by I want to loop the whole sequence in order.

推荐答案

已经想通了.有兴趣者的解决方案:

Figured it out already. Solution for those who are interested:

<animateTransform id="anim1" attributeName="transform" attributeType="XML" type="rotate" from="0" to="30" begin="0s; anim2.end" dur="0.4s" fill="freeze"/>
<animateTransform id="anim2" attributeName="transform" attributeType="XML" type="rotate" from="30" to="0" begin="anim1.end" dur="0.4s" fill="freeze"/>

这篇关于如何循环SVG动画序列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆