【发布时间】:2014-07-12 10:22:51
【问题描述】:
我发现了烦人的错误。当父元素的位置发生变化时(在示例中它从固定到绝对),我尝试为子元素的 CSS 属性设置动画。这在 Webkit 浏览器中没有问题,但在 Firefox (v. 17.0.1) 中没有动画过渡。
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%;
}
【问题讨论】:
-
在 Firefox 34 中,此错误似乎已解决。
标签: css firefox transitions