2013-04-22 36 views
1

爲什麼CSS動畫在Chrome中運行得很流暢,但在Firefox中不能運行?爲什麼CSS動畫在Chrome中運行得很順利,但在Firefox中不能運行?

網址:http://carloshermoso.com/works/rwd/

#mainContent h2 { -moz-animation-duration:3s; -moz-animation-name:slideIn; -webkit-animation-duration:3s; -webkit-animation-name:slideIn; text-transform:uppercase; } 
@-moz-keyframes slideIn 
{ 
from { margin-bottom:100%; width:300%; } 
to { margin-top:0%; width:100%; } 
} 
@-webkit-keyframes slideIn 
{ 
from { margin-bottom:100%; width:300%; } 
to { margin-top:0%; width:100%; } 
} 

萬分感謝!

回答

1

可能只是由於Chrome和Firefox的不同渲染引擎。如果你想看看如何提高css轉換速度,你可以看看this。 此外,您的代碼在Opera或Internet Explorer中不起作用,因爲您尚未包含Opera和IE 10使用的正常(無前綴)animation屬性。請注意,IE 9和以下版本根本不支持CSS動畫。有關該here的更多信息。

+0

毫米......它似乎並不是我面臨的問題的解決方案...我真的很驚訝這不適用於Firefox。它不適用於Opera或IE所有版本。但至少Firefox是預料之中的。 – carherlo 2013-04-22 01:55:22

+0

更新了我的回答,以適應那個 – 2013-04-22 01:58:56

+0

好吧,關於不在IE上工作。但是必須對代碼進行一些更改才能使這個簡單的動畫在Firefox中起作用。之前我看到過不同的動畫效果非常流暢。 – carherlo 2013-04-22 02:19:32

相關問題