我想按顺序动画几个SVG线元素,我在这里跟@Gaby方法A non-nested animation sequence in jQuery?并使用jQuery队列。但是我的WebkitAnimationEnd从未被解雇。也许它不会对SVG元素的工作,但多数民众赞成在文档没有提到:按顺序运行css动画和WebkitAnimationEnded
var q = $({});
function pushQueue(theQueue, selector, animationprops) {
theQueue.queue(function(next) {
$('#' + selector).one("webkitAnimationEnd oanimationend msAnimationEnd animationend", function(){
console.log('Animation ended, calling next..');
next();
});
s.select('#' + selector)
.clone()
.addClass('path')
.attr({
stroke: "#FFE840",
filter: 'none'
});
});
}
我添加以下CodePen,您可以点击阀刚下P103管才能看到效果。
+0
不应该是'开'而不是'一个'? –
+0
@Ian nop它的一个/one/,试穿以及 –