本文介绍了SVG .end事件不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习和玩一些基本的SVG动画.我正在查看关于CSS技巧的教程/指南,并注意到.end事件在Chrome和Safari中不起作用.是什么赋予了?这不被支持还是一个错误?对于一个简单的事情来说似乎很愚蠢.还是Codepen的错误?

I'm trying to learn and play with some basic SVG animations. I was going through a tutorial/guide on CSS-Tricks, and noticed that the .end event doesn't work in Chrome and Safari. What gives? Is this not supported or a bug?? Seems silly for a simple thing like. Or maybe it's a bug with Codepen?

Codepen示例- http://codepen.io/jaminroe/pen/xGQvEE/?editors = 110

Example Codepen - http://codepen.io/jaminroe/pen/xGQvEE/?editors=110

谢谢

推荐答案

使用它不是一个好主意-如果要使用animate来使用它,请在id中使用它,因为它假定您要开始这样的时间偏移量作为id-5s

It's not a good idea to use - in an id if you're going to use it with animate as it's assumed that you're starting a time offset such as id-5s

如果确实需要,您可以执行此操作,但是必须逃避它们,即

You can do if you really must but you have to escape them i.e.

begin="circ\-anim.end"

这篇关于SVG .end事件不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 00:12