我發現了惱人的錯誤。我嘗試在父級的位置同時改變時(在示例中它從固定位置改變爲絕對位置),嘗試對子元素的CSS屬性進行動畫處理。這在Webkit瀏覽器中沒有問題,但在Firefox(17.0.1)中沒有動畫過渡。當位置改變時,CSS轉換在Firefox中不起作用
的jsfiddle例如:http://jsfiddle.net/chodorowicz/bc2YC/5/
有沒有什麼解決方案,使其在FF工作?
編輯 它固定在Firefox 34 https://bugzilla.mozilla.org/show_bug.cgi?id=625289
CSS
#container {
position:fixed; left:100px; top:100px;
}
#container.some_state_position {
position:absolute;
}
.box {
width:100px; height:100px;
background:blue;
}
.some_state .box {
background:red; width:50px; height:50px;
}
img, .box {
-webkit-transition:all 1.5s ease;
-moz-transition:all 1.5s ease;
-ms-transition:all 1.5s ease;
transition:all 1.5s ease;
}
img {width:100%;}
.some_state .other_container img {
width:50%;
}
提交錯誤報告:https://bugzilla.mozilla.org/show_bug.cgi?id=821976 – chodorowicz
在Firefox 34中,此錯誤似乎已解決。 – mems