有谁知道为什么这个非常简单的jquery动画可以在Chrome等浏览器中完美工作,并且似乎在Firefox 7.0.1中被窃听? 这里是动画的a link。 如果你在Firefox中试用它,你会看到动画有时冻结,然后重新启动。正如你所看到的代码非常简单,只有一个动画,没有图像和内联CSS。Firefox 7.0.1上的jquery动画延迟
HTML:
<div id="content" style="position: relative;width: 500px;height: 500px;overflow: hidden;">
<ul id="slider" style="position: absolute;top:0;left:0;">
<li style="background-color: red;height: 500px;width: 500px;list-style-type: none;"></li>
<li style="background-color: green;height: 500px;width: 500px;list-style-type: none;"></li>
<li style="background-color: blue;height: 500px;width: 500px;list-style-type: none;"></li>
</ul>
</div>
JS:
$(document).ready(function() {
to_move=$('#slider');
to_move.animate({
top: "-1000px"
}, 15000,'linear');
});
感谢你的帮助。
谢谢,是否有任何moz webkit动画我可以用来避免这个GC问题? –
你可以看看[CSS Transitions] [1]。我自己并没有在愤怒中使用它们,你需要为旧版浏览器提供脚本回退。而且我知道他们会受到GC的影响。但是你有它;) [1]:https://developer.mozilla.org/en/CSS/CSS_transitions#AutoCompatibilityTable – N3dst4
事实上,我已经更新了Firefox 8.0.1版本,没有滞后! 似乎GC在最新版本中管理得更好。 再次感谢您的帮助! –