问题描述
上下文:我正在处理SVG中的信息图。我希望借助动画使文档栩栩如生,尤其是通过链接动画。我已经很熟悉SVG,但是直到最近才开始学习SVG动画。
Context: I'm working on an infographic in SVG. I want to have the document come to life thanks to animations, especially by chaining animations. I'm already familiar with SVG but started learning SVG animation only recently.
由于SMIL已弃用,因此我尝试制作纯SVG动画。 / strong>
Since SMIL is deprecated, I'm trying to produce animations in pure SVG.
,我在我需要停止使用suc hattributes的印象:
Looking at this article (esp. the Handy Dandy Replacement Reference Chart at the end), I'm under the impression that I need to stop using suc hattributes:
fill="freeze"
repeatCount="indefinite"
begin="hover"
begin="circ-anim.begin + 1s"
...因为它们是SVG SMIL的一部分。
…because they are part of SVG SMIL.
但是,如果我查看,我看到了< animate>
和< animateTransform>
列表中的任何内容,而不会警告他们是SMIL或其他e需要停止使用它们。
But, if I look at the SVG reference on Mozilla, I see <animate>
and <animateTransform>
inside the list, with no warning about them being SMIL, or the need to stop using them.
此外,似乎,但使用时我看不到这样的警告; animate>
或< animateTransform>
(在SVG文档中,或在包含内联或对象SVG的HTML文档中)。
Moreover, it seems Chrome normally warns against the use of SMIL animations in the console but I can see no such warning when using <animate>
or <animateTransform>
(be it in an SVG document, or inside an HTML document that includes an inline or object SVG.)
长话短说,我不清楚什么是SMIL,什么是纯SVG 。任何人都可以在这个话题上留下一些阴影吗? 我可以使用< animate>
和< animateTransform>
吗?
Long story short, it's not clear to me what is SMIL and what is pure SVG. Can anyone shade some light on the topic? Can I use <animate>
and <animateTransform>
?
推荐答案
SMIL为。
SVG中的SMIL基本是中的所有内容。
Basically SMIL in SVG is everything in the Animation chapter of the specification.
这是< animate>
元素,< set>
元素,< animateMotion>
元素和< animateTransform>
元素。 (SVG规范还包含不应使用的< animateColor>
元素,您可以将其替换为animate)。
That's the <animate>
element, the <set>
element, the <animateMotion>
element and the <animateTransform>
element. (the SVG specification also contains an <animateColor>
element which should not be used, you can just replace that with animate).
这篇关于什么是纯SVG,什么是SMIL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!