用roll.js实现的图片自动滚动+鼠标触动的特效

2018-09-27 09:43

阅读:624

  复制代码 代码如下:
<!--
varsh;
marqueesWidth=533;
preLeft=0;currentLeft=0;stopscroll=false;getlimit=0;preTop=0;currentTop=0;

functionscrollLeft()
{
if(stopscroll==true)return;
preLeft=marquees.scrollLeft;
marquees.scrollLeft+=2;
if(preLeft==marquees.scrollLeft)
{
//marquees.scrollLeft=templayer.offsetWidth-marqueesWidth+1;
}
}

functionscrollRight()
{
if(stopscroll==true)return;

preLeft=marquees.scrollLeft;
marquees.scrollLeft-=2;
if(preLeft==marquees.scrollLeft)
{
if(!getlimit)
{
marquees.scrollLeft=templayer.offsetWidth*2;
getlimit=marquees.scrollLeft;
}
marquees.scrollLeft-=1;
}
}

functionLeft()
{
stopscroll=false;
sh=setInterval(scrollLeft(),20);
}

functionRight()
{
stopscroll=false;
sh=setInterval(scrollRight(),20);
}

functionStopScroll()
{
stopscroll=true;
clearInterval(sh);
}



functionSelectType(value)
{
document.all.sendForm.page.value=1;
document.all.sendForm.type.value=value;

document.all.sendForm.submit();
}

functioninit()
{
with(marquees)
{
style.height=0;
style.width=marqueesWidth;
style.overflowX=hidden;
style.overflowY=visible;
style.align=center;
noWrap=true;
}
}


//-->

文件打包下载


评论


亲,登录后才可以留言!