Home >Web Front-end >JS Tutorial >js text scrolling pause effect code_javascript skills

js text scrolling pause effect code_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 19:03:202378browse

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Intermittent scrolling_www.jb51.net_Script Home
#Marquee{ height:60px; overflow:hidden;}
#Marquee div{ border:1px solid #DDD3FE; background:#EEECF4; height:58px;}



Intermittent-1-caiying2007

Intermittent-2-caiying2007

Intermittent-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>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn