【问题标题】:CSS3 bounce animation not working in FirefoxCSS3 弹跳动画在 Firefox 中不起作用
【发布时间】:2014-08-11 23:40:12
【问题描述】:

我在 HTML 中的 span 元素上设置了反弹动画。使用 setTimeout JQuery 函数触发动画。现在,动画在 Chrome 中运行良好,但是在 Firefox 中没有响应。这是css:

.bounceIn {
  -webkit-animation: bounceIn .75s;
  animation: bounceIn .75s;
}

@-webkit-keyframes bounceIn {
0%, 20%, 40%, 60%, 80%, 100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

0% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}

20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}

40% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}

60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}

80% {
-webkit-transform: scale3d(.97, .97, .97);
transform: scale3d(.97, .97, .97);
}

100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}


@keyframes bounceIn {
0%, 20%, 40%, 60%, 80%, 100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

0% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}

20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}

40% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}

60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}

80% {
-webkit-transform: scale3d(.97, .97, .97);
transform: scale3d(.97, .97, .97);
}

100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}

这是我的 JQuery

$('#score').hide();

setTimeout(showScore, 1500);

function showScore(){
$('#score').show(); 
}

span 的 id 为“score”,班级为“bounceIn” - 任何线索都将受到欢迎!在此先感谢:)

【问题讨论】:

    标签: css firefox animation


    【解决方案1】:

    你试过这个例子吗!

    我已经在 firefox v31.0 中测试过。

    http://daneden.github.io/animate.css/

    【讨论】:

    • 我已经用我的 JQuery 更新了这个问题 - 没有一个例子在 FF 中有效,我觉得这是我调用动画与 FF 的方式
    • 更新:我已将其缩小到 FF 无法识别跨度上的类。 IE。 文本。如果我将动画放在其他地方,它会起作用。所以这不是动画,而是跨度与类问题
    猜你喜欢
    • 2014-07-18
    • 1970-01-01
    • 1970-01-01
    • 2013-05-12
    • 1970-01-01
    • 1970-01-01
    • 2014-10-01
    • 2015-11-05
    • 1970-01-01
    相关资源
    最近更新 更多