2013-06-13 85 views
1
<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中運行它,他就會凍結,並且根本不會移動。jquery水平滑塊不工作firefox

謝謝正手

回答

1

#animateposition: absolute;這應該可以解決您的問題!

編輯:我提供了一個FIDDLE作品在Firefox 21

+0

好試了一下,不幸的是它沒有工作。 –

+0

看看我的編輯!您將動畫時間設置爲50秒。那是正確的? – supersize