<html> <HEAD> <TITLE>文字无缝滚动</TITLE> <META content="text/html; charset=utf-8" http-equiv=Content-Type> <STYLE type=text/css> *{padding:0;margin:0;font-size:12px;} a{text-decoration:none;} .conter{overflow:hidden;height:275px;width:180px; border:1px solid #ccc;} #demo a {display:block;color:#333;padding-left:2px;overflow:hidden;white-space:nowrap;width:178px;text-overflow:ellipsis;} #demo a:hover {color:#f00;} </STYLE> </HEAD> <body> <div id="demo" class="conter"> <div id="demo1" style="height:auto"> <a href="#" mce_href="#">01 英法国防部证实两国核潜艇相撞英法国防部证实两国核潜英法国防部证实两国核潜</a> <a href="#" mce_href="#">02 广电总局等严禁演员主持医疗节目</a> <a href="#" mce_href="#">03 日本首相麻生将任命与谢野馨接任辞职大臣</a> <a href="#" mce_href="#">04 广电总局等严禁演员主持医疗节目</a> <a href="#" mce_href="#">05 日本首相麻生将任命与局等严禁演员主局等严禁演员主谢野馨接任辞职大臣</a> <a href="#" mce_href="#">06 广电总局等严禁演员主持医疗节目</a> <a href="#" mce_href="#">07 日本首相麻生将任命与谢野馨接任辞职大臣</a> <a href="#" mce_href="#">08 广电总局等严局等严禁演员主局等严禁演员主禁演员主持医疗节目</a> <a href="#" mce_href="#">09 日本首相麻生将任命与谢野馨接任辞职大臣</a> <a href="#" mce_href="#">10 广电总局等严禁演员主持医疗节目</a> <a href="#" mce_href="#">11 日本首相麻生将任命与谢野馨接任辞职大臣</a> <a href="#" mce_href="#">12 广电总局等严禁演员主持医疗节目</a> </div> <div id=demo2 style =" height:auto"></div> </div> <mce:script type="text/javascript"><!-- var speed = 40 var demo = document.getElementById("demo"); var demo2 = document.getElementById("demo2"); var demo1 = document.getElementById("demo1"); demo2.innerHTML = demo1.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) } // --></mce:script> </body> </html>