Tip: You can modify some of the code before running
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <title> discontinuous and seamless scrolling effect of two text </title> < Meta http-equiv= "Content-type" content= "text/html;charset=gb2312" > <!--Add the following code to <pead> and </pead> Between--> <style type= "Text/css" > Box{width:150px;height:25px;line-height:25px;border: #bbb 1px solid;overflow : Hidden;} . Box ul{margin:0;padding:0}. Box Li{height:25px;line-height:25px;font-size:12px;text-align:center;list-style-type : none; </style> </pead> <body> <!--Add the following code between <body> and </body>--> <div class= "box id=" Marqueebox0 "> <ul> <li > First line </li> <li > second line </li> <li > Third Line ;/li> </ul> </div><br/> <div class= "box" id= "Marqueebox1" > <ul> <li > First Line </li> <li > second line </li> <li > Third line </li> </ul> </div> <script type= "Text/javascript" > Function StartMarquee (Lh,speed,delay,index) {var T; var P=false; var O=document.getelementbyid ("Marqueebox" +index); o.innerhtml+=o.innerhtml; O.onmouseover=function () {p=true} o.onmouseout=function () {p=false} o.scrolltop = 0; function Start () {t=setinterval (scrolling,speed); if (!p) {o.scrolltop + = 1;} The function scrolling () {if (o.scrolltop%lh!=0) {o.scrolltop = 1; if (O.SCROLLTOP>=O.SCROLLHEIGHT/2) o.scrolltop = 0; }else{clearinterval (t); SetTimeout (Start,delay); } settimeout (Start,delay); } startmarquee (25,30,3000,0); StartMarquee (25,40,0,1); </script> </body> </ptml>
Tip: You can modify some of the code before running