Jquery水平滑块不工作firefox

时间:2013-06-13 11:13:01

标签: jquery jquery-animate

<div id="animate" style="position: fixed; top: 150px; right: -1000px; width: 100%;height: 300px;"><A HREF="http://www.example.nl"><img src="http://www.example.nl/img/test.png"></a></div>
<script>
 $('#animate').animate({
right: '2000px',
}, 50000, function() {
// Animation complete.
});
</script>

此脚本的问题在于,如果我在Chrome中运行它,它将从右向左滑动。 但是只要我想在FireFox中运行它,他就会冻结,而根本不会移动。

感谢正手

1 个答案:

答案 0 :(得分:1)

#animate设置为position: absolute;这应该可以解决您的问题!

编辑:我在firefox 21上提供了FIDDLE作品。