【问题标题】:What is pure SVG and what is SMIL?什么是纯 SVG,什么是 SMIL?
【发布时间】: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> 吗?

【问题讨论】:

    标签: animation svg smil


    【解决方案1】:

    SMIL 是no longer deprecated by Chrome

    我们非常重视您的所有反馈,而且很明显,SMIL 提供服务的用例还没有高保真替代品。因此,我们决定暂停弃用的意图,并采取较小的步骤来实现其他选项。

    基本上,SVG 中的 SMIL 是 Animation chapter of the specification 中的所有内容。

    <animate> 元素、<set> 元素、<animateMotion> 元素和<animateTransform> 元素。 (SVG 规范还包含一个不应使用的 <animateColor> 元素,您可以将其替换为 animate)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-02
      • 1970-01-01
      • 2013-03-07
      • 1970-01-01
      • 2011-07-02
      • 2016-08-09
      • 1970-01-01
      • 2013-06-04
      相关资源
      最近更新 更多