相关疑难解决方法(0)

使用jQuery关闭CSS3动画?

我有一个加载页面时有动画的对象:

.logo-mark {
        -webkit-animation: spin 2s 1 cubic-bezier(0.000, 0.000, 0.230, 1.000);
            -moz-animation: spin 2s 1 cubic-bezier(0.000, 0.000, 0.230, 1.000);
            -ms-animation: spin 2s 1 cubic-bezier(0.000, 0.000, 0.230, 1.000);
            animation: spin 2s 1 cubic-bezier(0.000, 0.000, 0.230, 1.000);
    }
Run Code Online (Sandbox Code Playgroud)

在某个时间,我希望JavaScript打开一个无休止地发生的特定动画,直到JavaScript停止所述动画.所以我只创建了另一个名为.logo-load的类,并且在某些时候,jQuery执行了一个addClass和一个removeClass.

.logo-loading {
            -webkit-animation: spin 4s infinite linear;
                -moz-animation: spin 4s infinite linear;
                -ms-animation: spin 4s infinite linear;
                animation: spin 4s infinite linear;
        }
Run Code Online (Sandbox Code Playgroud)

但是,当JavaScript删除类时,无论如何,对象都会保持旋转.我能在这做什么吗?

javascript jquery animation css3

16
推荐指数
2
解决办法
2万
查看次数

标签 统计

animation ×1

css3 ×1

javascript ×1

jquery ×1