【发布时间】:2017-04-21 02:14:42
【问题描述】:
上下文: 我正在制作 SVG 中的信息图。我希望借助动画,尤其是通过链接动画,让文档栩栩如生。我已经熟悉 SVG,但最近才开始学习 SVG 动画。
由于 SMIL 已被弃用,我正在尝试用纯 SVG 制作动画。
Looking at this article (esp. the Handy Dandy Replacement Reference Chart at the end),我的印象是我需要停止使用 suc hattributes:
fill="freeze"
repeatCount="indefinite"
begin="hover"
begin="circ-anim.begin + 1s"
...因为它们是 SVG SMIL 的一部分。
但是,如果我查看SVG reference on Mozilla,我会在列表中看到<animate> 和<animateTransform>,没有警告它们是SMIL,或者需要停止使用它们。
此外,似乎是Chrome normally warns against the use of SMIL animations in the console,但在使用<animate> 或<animateTransform> 时我看不到这样的警告(无论是在SVG 文档中,还是在包含内联或对象SVG 的HTML 文档中。)
长话短说,我不清楚什么是 SMIL,什么是纯 SVG。任何人都可以对这个话题有所了解吗? 我可以使用<animate> 和<animateTransform> 吗?
【问题讨论】: