【问题标题】:Companimation: CSS3 Animations Only Working on LoadCompanimation:CSS3 动画仅在加载时起作用
【发布时间】:2014-08-06 22:35:20
【问题描述】:

我正在使用Mike Fowler's companimation library for compass,但我的动画在 FireFox 中根本无法运行(虽然它们在 Chrome 中运行良好)。当文档第一次显示时,动画会触发,但是当元素通过 jQuery 显示/隐藏时动画不会触发。

Here's a plugin I made using the library that has animations。任何帮助将不胜感激。

【问题讨论】:

    标签: jquery css firefox animation


    【解决方案1】:

    我正在使用 JQueryKeyframes。这行得通。 试试看

    https://github.com/jQueryKeyframes/jQuery.Keyframes
    

    您可以自定义功能完成

    $('selector').playKeyframe({
        name: "keyframe_name", 
        duration: time*1000,
        timingFunction: 'linear', 
        delay: 0,
        //repeat: 0, 
        direction: 'normal', 
        fillMode: 'forwards',
        complete: function(){ 
    
            $('selector').css('-webkit-animation', '');
        }
    }); 
    

    【讨论】:

    • 这没有回答问题。您是说为了让动画在显示/删除元素时在 FF 中工作,我需要使用库吗?那为什么这在没有 JS 库的 webkit 浏览器中可以工作呢?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多