2009-09-10 54 views
0

我已經this site I am developing - 我做了下面的代碼卷軸:如何使用JQuery進行連續滾動?

$(document).ready(function() 
{ 
     function scrollIt() 
     { 
     $('#featured-brands div#scroll').animate({ 
      marginLeft: "-4550px"}, 85000, "linear").animate({ 
       marginTop: "-223px" }, 200, "linear").animate({ 
        marginLeft: "750px" }, 100, "linear").animate({ 
       marginTop: "57px" }, 1, "linear", scrollIt); 
     } 
     scrollIt(); 
}); 

當最終圖像通過滑動,有一個白色的空白可見,我會怎麼做第一個圖像出現之後最終圖像,所以沒有空白?

乾杯, 基思

回答

3

它一分爲二。當一個人脫離底部時,移動它,使其位於另一個之上。

+0

謝謝,得到任何代碼來幫助? – 2009-09-10 02:37:52

+1

我做了一個演示。我離開剪輯(你可以想象黑色矩形剪輯),所以你可以看到它是如何工作的:http://jasonwoof.com/downloads/scroll_demo.html – JasonWoof 2009-09-10 03:34:18