jQueryMarqueemarquee 無縫滾動(dòng)插件
jQueryMarquee 是一個(gè)基于 jquery 實(shí)現(xiàn)的 marquee 無縫滾動(dòng)插件
一共有三個(gè)可選參數(shù),一個(gè)回調(diào)方法。
$(dom).marquee(options, callback);
options 可選參數(shù):
options : {
direction : 'top',
pixels : 5,
speed : 30,
}
direction
移動(dòng)方向:
左:left
右:right
上:top
下:bottom;
pixels
每次移動(dòng)的像素?cái)?shù)
speed
兩次移動(dòng)之前的間隔時(shí)間數(shù)(毫秒)
調(diào)用方法如下:
$("scroll-a").marquee();
$("scroll-b").marquee({direction:'top'});
$("scroll-c").marquee({direction:'right',pixels:2,speed:30});
$("scroll-d").marquee({direction:"bottom",pixels:2,speed:30}, function(){
console.log("執(zhí)行了一次");
});
評(píng)論
圖片
表情
