水平滚动
[@more@]
水平滚动,首尾相连(滚动区域小于两个内容宽度之和)
|
水平滚动,首尾相连(滚动区域小于两个内容宽度之和)
|
垂直滚动
view plaincopy to clipboardprint?
1、尊重他人劳动成果,转载请自觉注明出处!
2、尊重他人劳动成果,转载请自觉注明出处!
3、尊重他人劳动成果,转载请自觉注明出处!
4、尊重他人劳动成果,转载请自觉注明出处!
垂直滚动,首尾相连(滚动区域小于两个内容宽度之和)
1、尊重他人劳动成果,转载请自觉注明出处!
2、尊重他人劳动成果,转载请自觉注明出处!
3、尊重他人劳动成果,转载请自觉注明出处!
4、尊重他人劳动成果,转载请自觉注明出处!
新闻轮翻效果
view plaincopy to clipboardprint?
New Document
marqueeId++;
marqueeInterval[0]=setInterval("startMarquee()",speed);
}
function startMarquee() {
var str=marqueeContent[marqueeId];
marqueeId++;
if(marqueeId>=marqueeContent.length) marqueeId=0;
if(box.childNodes.length==1) {
var nextLine=document.createElement('div');
nextLine.innerHTML=str;
box.appendChild(nextLine);
}
else {
box.childNodes[0].innerHTML=str;
box.appendChild(box.childNodes[0]);
box.scrollTop=0;
}
clearInterval(marqueeInterval[1]);
marqueeInterval[1]=setInterval("scrollMarquee()",20);
}
function scrollMarquee() {
box.scrollTop++;
if(box.scrollTop%lineHeight==(lineHeight-1)){
clearInterval(marqueeInterval[1]);
}
}
initMarquee();
本文来自优快云博客,转载请标明出处:http://blog.youkuaiyun.com/ppjava2009/archive/2010/02/24/5323318.aspx
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23493047/viewspace-1033131/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23493047/viewspace-1033131/