<div class="codetitle"> <span><a style="CURSOR: pointer" data="99994" class="copybut" id="copybut99994" onclick="doCopy('code99994')"><u>코드 복사</u></a></span> 코드는 다음과 같습니다.</div> <div class="codebody" id="code99994"> <br><script> /*speed 값이 클수록 속도는 느려집니다*/ <br>document.getElementById('www_qpsh_com2').innerHTML=document.getElementById('www_qpsh_com1').innerHTML <br><br>/*두 레이어 앞뒤로 번갈아 가며*/ <br>function Marquee(){ <br>if(document.getElementById('www_qpsh_com2').offsetWidth-document.getElementById('www_qpsh_com').scrollLeft<=0) <BR>document.getElementById ('www_qpsh_com').scrollLeft -=document.getElementById('www_qpsh_com1').offsetWidth; <BR>else{ <BR>document.getElementById('www_qpsh_com').scrollLeft ; <BR>} <BR>document.getElementById( 'my_marquee_info').innerHTML= ''; <BR>document.getElementById('my_marquee_info').innerHTML ='div.scrollTop:' document.getElementById('www_qpsh_com').scrollLeft <BR>} <BR>var MyMar; =setInterval(Marquee,speed) ; <BR>www_qpsh_com.onmouseover=function() {clearInterval(MyMar);} <BR>www_qpsh_com.onmouseout=function() {MyMar=setInterval(Marquee,speed);} <BR>< ;/스크립트> <br> <br> </div>데모 코드:<br><br><div class="htmlarea"> <textarea id="runcode8280"> 나의 Marquee Halign<title> </title> <style> /*My Marquee CSS Start*/ .my_marquee_info{width:200px;border:#987654 solid 1px;padding:20px 3px 3px 2px;margin-top:30px;} .my_marquee_main{width:200px;height:160px;border:#234567 solid 1px;padding:2px 3px 3px 2px;overflow:hidden;} .my_marquee_div1{width:195px;border:Green solid 1px;} .my_marquee_div2{width:195px;border:Red solid 1px;} /*My Marquee CSS End*/ </style> <div id="www_qpsh_com" style="overflow: hidden; height: 140px; width: 800px;"> <table align="left" cellpadding="0" cellspace="0" border="0"> <tr> <td id="www_qpsh_com1" valign="top"> <table border="0" cellpadding="0" cellspacing="10"> <tr> <td height="96" align="center" valign="middle" style="background-color:Green;" title="我是第一个"> <img border="0" src="7005658357973.jpg" style="max-width:90%" style="max-width:90%" hspace="11" vspace="5" alt="js_javascript 기술로 구현된 움직이는 움직이는 수평 원형 스크롤" > <center> 训练场地</center> </td> <td height="96" align="center" valign="middle"> <img border="0" src="7000940554735.jpg" style="max-width:90%" style="max-width:90%" hspace="11" vspace="5" alt="js_javascript 기술로 구현된 움직이는 움직이는 수평 원형 스크롤" > <center> 休闲茶吧</center> </td> <td height="96" align="center" valign="middle"> <img border="0" src="7000840962304.jpg" style="max-width:90%" style="max-width:90%" hspace="11" vspace="5" alt="js_javascript 기술로 구현된 움직이는 움직이는 수평 원형 스크롤" > <center> 会所简介</center> </td> <td height="96" align="center" valign="middle"> <img border="0" src="7000746023064.jpg" style="max-width:90%" style="max-width:90%" hspace="11" vspace="5" alt="js_javascript 기술로 구현된 움직이는 움직이는 수평 원형 스크롤" > <center> 室内赛场和马房</center> </td> <td height="96" align="center" valign="middle" style="background-color:Red;" title="我是最后一个"> <img border="0" src="7000556611956.jpg" style="max-width:90%" style="max-width:90%" hspace="11" vspace="5" alt="js_javascript 기술로 구현된 움직이는 움직이는 수평 원형 스크롤" > <center> 牧马场</center> </td> </tr> </table> </td> <td id="www_qpsh_com2" valign="top"> </td> </tr> </table> </div> <div class="my_marquee_info" id="my_marquee_info"> </div> </textarea><br><input onclick="runEx('runcode8280')" type="button" value="运行代码"> <input onclick="doCopy('runcode8280')" type="button" value="复制代码"> <input onclick="doSave(runcode8280)" type="button" value="保存代码">[Ctrl A 모두 선택 참고: <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다 </a>]</div>