【问题标题】:CSS3 animating border-radius on Firefox not workingFirefox 上的 CSS3 动画边框半径不起作用
【发布时间】:2013-03-21 12:18:42
【问题描述】:

我目前正在尝试制作一个动画扩展球体(圆),它只是一个仅使用 css3 应用了边框半径的 div。

我设法使动画在 webkit 浏览器上工作,保持动画元素的球形/圆形,但我不知道为什么它不能在 Firefox 上工作。它确实应用了一些边框半径(大约 20 像素),但不像在 webkit 上那样工作。

这是我使用的代码。

@-webkit-keyframes expandSphere
{
    0%{padding:10px; opacity: 0;}
    25%{height: 150px; border-radius: 150px; width:150px; left:520px; top:200px;}
    55%{height: 350px; border-radius: 500px; width:350px; left:420px; top:100px;}
    75%{height: 547px; border-radius: 700px; width:700px; top:0; left:250px;}
    100%{height:547px; opacity: 1; top:0px; left:0; width:1180px; border-radius: 0;}
}
@-moz-keyframes expandSphere
{
    0%{padding:10px; height:20px; width:20px; opacity: 0; -moz-border-radius: 50px;}
    25%{height: 150px; width:150px; left:520px; top:200px; -moz-border-radius: 150px;}
    55%{height: 350px; width:350px; left:420px; top:100px; -moz-border-radius: 500px;}
    75%{height: 547px; width:700px; top:0; left:250px; -moz-border-radius: 700px;}
    100%{height:547px; opacity: 1; top:0px; left:0; width:1180px; -moz-border-radius: 0;}
}

【问题讨论】:

    标签: css firefox animation


    【解决方案1】:

    您希望在不需要时停止使用供应商前缀。

    具体见https://stackoverflow.com/a/10927566/720912

    【讨论】:

    • 帅哥!谢谢!有效。现在我要去歌剧了。而且我运气不好。
    • 对于 Opera,使用 无前缀 关键帧动画。并将它们添加到 前缀之后。 Firefox 还支持无前缀的关键帧动画。见caniuse.com/#feat=css-animation
    猜你喜欢
    • 2012-11-08
    • 2015-06-27
    • 2011-04-14
    • 2012-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多