2011-11-17 48 views

回答

0

這裏是一個的jsfiddle向左滾動 http://jsfiddle.net/fUNnJ/

這裏是HTML

<div class="slideshow"> 
    <img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" /> 
    <img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" /> 
    <img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" /> 
    <img src="http://cloud.github.com/downloads/malsup/cycle/beach4.jpg" width="200" height="200" /> 
    <img src="http://cloud.github.com/downloads/malsup/cycle/beach5.jpg" width="200" height="200" /> 
</div> 

的JS

$(document).ready(function() { 
    $('.slideshow').cycle({ 
     fx: 'scrollLeft' 
    }); 
}); 

,或者您可以使用它來向右滾動。

$(document).ready(function() { 
    $('.slideshow').cycle({ 
     fx: 'scrollRight' 
    }); 
}); 

去這裏的所有過渡http://jquery.malsup.com/cycle/begin.html