<html> <head> <meta charset="UTF-8"> <style type="text/css"> .con1{width:250px;height:226px;background:red;float:left;margin-bottom: 10px;} .con1 h1{width:250px;height:33px;font-size:13px;text-align: center;background:pink;color:deeppink;line-height:33px;} .con1 div { background:red; width:100%; height:187px; overflow:hidden; } #gun1 li span{margin-left: 20px;} .con1 div ul{ width:240px; height:auto; letter-spacing:1px; list-style-type:none; color:#fff;font-size:12px;margin:0 auto;line-height:150%; } .con1 div ul{ scrollbar-face-color: #333; scrollbar-highlight-color:#666; scrollbar-shadow-color: #333; scrollbar-3dlight-color: #999; scrollbar-arrow-color: #999; scrollbar-track-color: #000 } .con1 div span{color:#28EF12;} </style> </head> <body> <div class="con1"> <h1>【V】节目单</h1> <div id="new_r"> <div id="boxgun" > <ul id="gun1"> <!-- <marquee behavior="scroll" direction="up" width="216" style="margin-left:25px;" onmouseover="this.stop()" onmouseout="this.start()"> --> <li><a href="#"><span>01-17</span> 19:30南北明星赛</a></li> <li><a href="#"><span>01-17</span> 22:00CCTV-5(体育)</a></li> <li><a href="#"><span>01-17</span> 22:00CCTV-5(高清)</a></li> <li><a href="#"><span>01-17</span> 21:55CCTV风云足球</a></li> <li><a href="#"><span>01-17</span> 18:50BTV体育直播</a></li> <li><a href="#"><span>01-17</span> 22:55澳视体育</a></li> <li><a href="#"><span>01-17</span> 22:03BTV体育直播</a></li> <li><a href="#"><span>01-17</span> 21:00CCTV5+现场直播</a></li> <li><a href="#"><span>01-17</span> 19:30篮球频道现场</a></li> <li><a href="#"><span>01-17</span> 19:25上视电视台</a></li> <li><a href="#"><span>01-17</span> 19:25BTV体育直播</a></li> <li><a href="#"><span>01-17</span> 18:55天津电视台</a></li> <li><a href="#"><span>01-17</span> 18:55新疆电视台</a></li> <li><a href="#"><span>01-17</span> 18:45广东电视台</a></li> <li><a href="#"><span>01-17</span> 18:30CCTV-5(高清)</a></li> <!--</marquee>--> </ul> <ul id="gun2" style="overflow:hidden;"></ul> </div> </div> <script type="text/javascript"> var huoqu=document.getElementById("new_r"); var gun1=document.getElementById("gun1"); var gun2=document.getElementById("gun2"); gun2.innerHTML=gun1.innerHTML; function mysc() { if (huoqu.scrollTop >= gun1.offsetHeight) { huoqu.scrollTop = 0; } else { huoqu.scrollTop++; } } huoqu.scrollTop=0;//开始位置 var time=50; var myscroll=setInterval("mysc()",time); //鼠标悬停 huoqu.onmouseover=function(){ clearInterval(myscroll); } huoqu.onmouseout=function(){ myscroll=setInterval("mysc()",time); } </script> </body> </html>