不间断滚动
2015-06-17 16:23
288 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>图片不间断向左滚动JS代码</title> <style> #demo{width:728px; overflow:hidden; margin:0px auto}</style> </head> <body> <div id="demo"> <table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 > <tr><td valign=top bgcolor=ffffff id=marquePic1> <table width='100%' border='0' cellspacing='0'><tr> <td align=center><a href='http://www.16sucai.com'><img src="images/01.jpg" width=232 height=139 border=0><br><br>01</a></td> <td align=center><a href='http://www.16sucai.com'><img src="images/02.jpg" width=232 height=139 border=0><br><br>02</a></td> <td align=center><a href='http://www.16sucai.com'><img src="images/03.jpg" width=232 height=139 border=0><br><br>03</a></td> <td align=center><a href='http://www.16sucai.com'><img src="images/04.jpg" width=232 height=139 border=0><br><br>04</a></td> <td align=center><a href='http://www.16sucai.com'><img src="images/05.jpg" width=232 height=139 border=0><br><br>05</a></td> </tr></table> </td><td id=marquePic2 valign=top></td></tr> </table></div> <div style="height:90px; width:728px; padding-top:10px; margin:0px auto;"> <script type="text/javascript"><!-- google_ad_client = "ca-pub-6110696270771103"; /* 全站大横幅 */ google_ad_slot = "4968847295"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <script type="text/javascript"> var speed=50 marquePic2.innerHTML=marquePic1.innerHTML function Marquee(){ if(demo.scrollLeft>=marquePic1.scrollWidth){ demo.scrollLeft=0 }else{ demo.scrollLeft++ } } var MyMar=setInterval(Marquee,speed) demo.onmouseover=function() {clearInterval(MyMar)} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} </script> </body> </html>
相关文章推荐
- 网站打开速度慢的深层次原因分析
- Keytool生成keystore实战
- 禁止在.net framework中执行用户代码。启用“clr enabled” 配置选项
- 七牛用图片处理接口处理后质量控制
- 单链表常见操作
- 如何选择运放?
- php workplace 权限问题
- LeetCodeOJ_189_Rotate Array
- Android listView 隔行变色+按下变色
- js基础学习第一天(关于DOM和BOM)一
- 博客园 首页 公告 自定义 标准 时钟/一般时钟 HONE HONE CLOCK时钟
- Ubuntu 更改文件夹权限及chmod详细用法
- linux命令11--联机帮助
- Fibonacci数列
- Java多线程编程总结笔记——03概念与原理
- android软键盘把页面顶上去
- VS2010(英文版) 打包应用程序
- ThinkPHP3.2对MongoDB的基本操作
- javal连接mysq数据库
- mysql unrecognized service问题解决