1<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">234<title> China webmaster Sky-Web Effects-text effects-compatible with various browser text loops seamless scrolling effect </title>5<meta http-equiv= "Content-type" content= "text/html;charset=gb2312" >6<!--Add the following code between 7<style type= "Text/css" >8*{margin:0;padding:0;}9body{font:12px/1.5Tahoma;}Ten div{position:absolute;margin:0px;padding:0px;left:0px;top:0px;width:400px;overflow:hidden;height:20px;} One #gd {position:absolute;margin:0px;padding:0px;left:0px;top:0px;width:800px;height:20px;} A a{padding:5px;} -#gd li{list-style-type:none;white-Space:nowrap;} -#gd Li Span{zoom:1} the</style> - -<body> -<!--Add the following code between <body> and </body>-- +<div> -<ul id= "GD" > +<li> A<span> at<a href= "#" > China webmaster Sky, Webmaster Construction Station Park </a> -<a href= "#" > Cola cat-to people, to things </a> -<a href= "#" > Baidu a bit, you know </a> -</span> -</li> -</ul> in</div> -<script language= "JavaScript" > tovar Oul = document.getElementById (' GD '); +var oLi = oul.getelementsbytagname (' li ') [0]; -Oli.getelementsbytagname (' span ') [0].style.marginleft = 0; theOli.appendchild (Oli.getelementsbytagname (' span ') [0].clonenode (true)) *var timer =NULL, ismove=true; $Timer = setinterval (move, 30);Panax Notoginseng function Move () { - if(!ismove)return; thevar spandom = oli.getelementsbytagname (' span ') [0]; +SpanDom.style.marginLeft = parseint (spandom.style.marginleft,10)-2 + "px"; A if(Math.Abs (parseint (spandom.style.marginleft,10)) > parseint (spandom.offsetwidth,10)) { theSpanDom.style.marginLeft = 0; + oli.appendchild (spandom) - } $ } $Oul.onmouseover =function () { -Ismove=false; - } theOul.onmouseout =function () { -Ismove=true;Wuyi } the</script>
Compatible with text loops in a variety of browsers seamless scrolling effect