English
Web page special effects code that automatically scrolls up text and stops scrolling when the mouse is placed on it! The code comes from the Internet.
<html> <HEAD> <TITLE>Automatically scroll up text and stop when the mouse is placed on it</TITLE> <META content="text/html; charset=gb2312" http-equiv=Content-Type> <STYLE type=text /css> #demo a { width:100%; overflow:hidden; font:12px/16px tahoma; display:block; text-decoration:none; margin:2px; color:#4a551c; padding-left:2px; text- align:left; } #demo a:hover { color:#ff6600; } </STYLE> </HEAD> <body> <div id="demo" style="overflow:hidden;height:132px;width:400px; border:1px solid #dde5bc;"> <div id="demo1"> <a href="#">This special effects code is fully compatible with IE, FF, Opera, others have not been tested...</a> <a href="#">Website Building Academy has collected and compiled it, I hope you can give us more opinions</a> <a href="#">This special effect code is fully compatible with IE, FF, Opera, others have not been tested yet...</a > <a href="#">Website Building Academy has collected and compiled it, hope you can give us more opinions</a> <a href="#">This special effects code is fully compatible with IE, FF, Opera, and others have not been tested yet... </a> <a href="#">Website Building Academy has collected and compiled it, I hope you can give us more opinions</a> <a href="#">This special effect code is fully compatible with IE, FF, Opera, others have not been approved yet Test...</a> <a href="#">Website Building Academy collects and organizes, hope you can give us more opinions</a> <a href="#">This special effect code is fully compatible with IE, FF, Opera, and others It has not been tested yet...</a> <a href="#">Collected and compiled by the Website Building Academy, I hope you can give us more opinions</a> <a href="#">This special effect code is fully compatible with IE, FF, Opera , others have not been tested yet... </a> <a href="#">Website Building Academy has collected and compiled, I hope you can give us more opinions</a> </div> <div id="demo2"></div > </div> <script> var speed=40 var demo=document.getElementById("demo"); var demo2=document.getElementById("demo2"); var demo1=document.getElementById("demo1"); demo2. innerHTML=demo1.innerHTML function Marquee(){ if(demo2.offsetTop-demo.scrollTop<=0) demo.scrollTop-=demo1.offsetHeight else{ demo.scrollTop++ } } var MyMar=setInterval(Marquee,speed) demo.onmouseover =function() {clearInterval(MyMar)} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} </script> </body> </html>