Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.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
Animation svg图像动画浏览器兼容性_Animation_Svg_Cross Browser_Webkit - Fatal编程技术网

Animation svg图像动画浏览器兼容性

Animation svg图像动画浏览器兼容性,animation,svg,cross-browser,webkit,Animation,Svg,Cross Browser,Webkit,我通过修改源代码中的代码来设置svg图像的动画。 它在torch浏览器中运行得非常好,但在google chrome和其他浏览器中没有动画效果。 我将此代码用于svg图像的xml文件中的动画 <animateColor attributeName="fill" attributeType="XML" from="black" to="grey" dur=".5s" repeatCount="indefinite"/> <animateColor attributeName

我通过修改源代码中的代码来设置svg图像的动画。 它在torch浏览器中运行得非常好,但在google chrome和其他浏览器中没有动画效果。 我将此代码用于svg图像的xml文件中的动画

<animateColor attributeName="fill" attributeType="XML" from="black" to="grey" dur=".5s" repeatCount="indefinite"/>   
<animateColor attributeName="stroke" attributeType="XML" from="black" to="grey" dur=".5s" repeatCount="indefinite"/> 

正如前面指出的那样,制作svg图像动画的正确方法是使用animate标记,因为animateColor标记已被弃用

<animate attributeName="fill" attributeType="XML" from="black" to="grey" dur=".5s" repeatCount="indefinite"/>   
<animate attributeName="stroke" attributeType="XML" from="black" to="grey" dur=".5s" repeatCount="indefinite"/>

不要使用
,因为它已被弃用。有些UAs实现了它,有些则没有


幸运的是
可以在任何地方使用
并且语法相同,因此只需全局搜索并将animateColor替换为animate,您应该已经准备好了。

谢谢您,先生,您的回答很有帮助。