Animation svg图像动画浏览器兼容性
我通过修改源代码中的代码来设置svg图像的动画。 它在torch浏览器中运行得非常好,但在google chrome和其他浏览器中没有动画效果。 我将此代码用于svg图像的xml文件中的动画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
<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,您应该已经准备好了。谢谢您,先生,您的回答很有帮助。