问题描述
我在:after元素上设置了动画,并在animationend事件上设置了事件处理程序.但是,animationend事件永远不会在IE10/IE11中触发.
I have an animation set on an :after element and a event handler on the animationend event. However, the animationend event never fires in IE10/IE11.
$(document).ready(function(){
var testdiv = $('#testid');
testdiv.on('animationend webkitAnimationEnd', function(){
document.writeln('Animation has ended');
});
});
JSFiddle: http://jsfiddle.net/Robin_f/R3qEG/
JSFiddle: http://jsfiddle.net/Robin_f/R3qEG/
衷心希望有人可以帮助我解决这个问题.
Sincerely hope someone can help me with this.
推荐答案
在网上搜索后,很明显IE尚不支持对伪元素上的动画事件的绑定.我在原始帖子中发布的jsFiddle使这一点更加明显,当动画结束时不会触发该事件.
After searching the web it has become apparent that IE does not yet support the binding to animation events on a pseudo element. This is made more obvious by the jsFiddle I posted in my original post, which doesn't trigger the event when the animation ends.
这篇关于Animationend事件未在:after元素上触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!