nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
간헐적 스크롤_www.jb51.net_Script 홈 #Marquee{ 높이 :60px; 오버플로:숨겨짐;}
#Marquee div{ border:1px solid #DDD3FE; 배경:#EEECF4; 높이:58px;}
간헐-1-caiying2007
간헐-2-caiying2007
간헐-3- caiying2007
<script> <BR>var Mar = document.getElementById("Marquee"); <BR>var child_div=Mar.getElementsByTagName("div") <BR>var picH = 60;//移动高度 <BR>var scrollstep=3;//移动步幅,越大越快 <BR>var scrolltime=20;//移动频度(毫秒)越大越慢 <BR>var stoptime=3000;//间断时间(毫秒) <BR>var tmpH = 0; <BR>Mar.innerHTML += Mar.innerHTML; <BR>function start(){ <BR> if(tmpH < picH){ <BR> tmpH += scrollstep; <BR> if(tmpH > picH )tmpH = picH ; <BR> Mar.scrollTop = tmpH; <BR> setTimeout(start,scrolltime); <BR> }else{ <BR> tmpH = 0; <BR> Mar.appendChild(child_div[0]); <BR> Mar.scrollTop = 0; <BR> setTimeout(start,stoptime); <BR> } <BR>} <BR>onload=function(){setTimeout(start,stoptime)}; <BR></script>