小编Nir*_*lan的帖子

jQuery检测animate.css的动画结尾

我正在建立网站的初始屏幕的div。

<div id="preloader" class="animated zoomOut">
    <div class="loader">
        <img src="assets/images/preloader-logo.png" alt="oscar pro logo"/>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

即时通讯使用动画css对其缩小进行动画处理,问题是缩小后它具有完整的宽度和高度,并且我无法与该站点进行交互。

我试图使用jQuery将其显示设置为无,但我似乎无法弄清楚...

$('preloader').one("animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd", function(){
    $(this).css('display', 'none');
});
Run Code Online (Sandbox Code Playgroud)

如果我将功能更改为警报,则在页面加载时将触发

有什么帮助吗?

jquery animate.css

1
推荐指数
2
解决办法
5593
查看次数

标签 统计

animate.css ×1

jquery ×1