我正在制作一个基于轮播的 Tumblr 主题 HERE但我对动画非常失望。有什么我可以补充的吗:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2
/jquery.min.js"></script>
<script type="text/javascript" src="http://malsup.github.com/chili-1.7.pack.js">
</script>
<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle
/jquery.cycle.all.2.72.js"></script>
<script type="text/javascript" src="http://malsup.github.com
/jquery.easing.1.1.1.js">
</script>
<script type="text/javascript">
$.fn.cycle.defaults.timeout = 6000;
$('#s7').cycle({
fx: 'scrollRight',
speed: 'fast',
timeout: 0,
easeIn: 'bounceout',
easeOut: 'backin',
next: '#next2',
prev: '#prev2'
});
function onBefore() {
$('#output').html("Scrolling image:<br>" + this.src);
//window.console.log( $(this).parent().children().index(this) );
}
function onAfter() {
$('#output').html("Scroll complete for:<br>" + this.src)
.append('<h3>' + this.alt + '</h3>');
}
</script>
让轮播的动画更流畅?
最佳答案
改变你的选择,伙计。
$('#s7').cycle({
fx: 'scrollRight',
speed: 1000,
timeout: 0,
next: '#next2',
prev: '#prev2',
easing: 'easeinout'
});
关于javascript - 在轮播上创建更流畅的动画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5986741/