js 圖片不斷向上滾動的廣告圖片代碼

來源:互聯網
上載者:User
提示:您可以先修改部分代碼再運行

<style type="text/css">/*廣告開始*/.ad1,.ad2,.ad3,.ad4{width:938px;height: 38px;border: 1px solid #c9c9c9;padding: 1px 0;margin: 1px 0 3px 0;}.ad3{margin: 0px;}.ad4{margin-top: 4px;}.ad2{margin: 4px 0px;}#slidetexts,#slidetextsc{OVERFLOW: hidden;HEIGHT:38px;margin: 0;padding: 0; } #ad2,#dt_top_ad{ width: 938px;height: 76px;border: 1px solid #c9c9c9;margin: 0px auto;padding: 1px 0;margin: 1px 0 3px 0;vertical-align: middle; } /*廣告結束*/</style><div class="ad1"><!--頂部廣告層開始--> <script language="JavaScript" type="text/javascript">function slideLine(ul, delay, speed, lh) {var slideBox = (typeof ul == 'string')?document.getElementById(ul):ul;var delay = delay||1000, speed=speed||20, lh = lh||20;var tid = null, pause = false;var start = function() {tid=setInterval(slide, speed);}var slide = function() {if (pause) return;slideBox.scrollTop += 2;if (slideBox.scrollTop % lh == 0) {clearInterval(tid);slideBox.appendChild(slideBox.getElementsByTagName('div')[0]);slideBox.scrollTop = 0;setTimeout(start, delay);}}slideBox.onmouseover=function(){pause=true;}slideBox.onmouseout=function(){pause=false;}setTimeout(start, delay);}</script> <div id="slidetexts"><div></div><div></div><div></div><SCRIPT language="javascript" type="text/javascript"> try{ slideLine('slidetexts', 5500, 38, 38); }catch(e) {} </SCRIPT></div></div>
提示:您可以先修改部分代碼再運行

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.