javascript - Animationend 事件未在 :after element 上触发

标签 javascript jquery css events animation

我在 :after 元素上设置了动画,在 animationend 事件上设置了事件处理程序。但是,animationend 事件永远不会在 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/

真诚地希望有人能帮助我。

最佳答案

在网上搜索后,很明显IE 还不支持绑定(bind)到伪元素上的动画事件。我在原始帖子中发布的 jsFiddle 使这一点变得更加明显,它不会在动画结束时触发事件。

关于javascript - Animationend 事件未在 :after element 上触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22713076/

相关文章:

Javascript html替换标签不起作用

javascript - 在不转换为用户时区的情况下以时区输入显示时间

javascript - jQuery Ajax更改缓存的变量名称: false

javascript - jQuery Flot 图未加载(JSON 数据)

jquery - 在 pjax 容器加载上保留脚本

javascript - HREF 的修改超出了我的控制范围...?

带有 CSS 媒体查询的 jQuery 选项卡

html - 响应超大屏幕图像

javascript - 当输入为空时更改 <li> 的样式

javascript - jquery如何判断图片是否有alt属性