图片无缝滚动代码(DIV+CSS+JavaScript)
2010-04-16 17:59
645 查看
<div id="imgbox" style="height:110px;width:600px;overflow:hidden;"> <div id="imgbox1" style="float:left;width:1000%"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> <img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif"> </div> <div id="imgbox2" style="float:left" mce_style="float:left"></div> </div>
<mce:script type="text/javascript"><!-- var speed=30; var imgbox=document.getElementById("imgbox"); var imgbox1=document.getElementById("imgbox1"); var imgbox2=document.getElementById("imgbox2"); imgbox2.innerHTML=imgbox1.innerHTML; function Marquee(){ if(imgbox2.offsetWidth-imgbox.scrollLeft<=0) imgbox.scrollLeft-=imgbox1.offsetWidth; else{ imgbox.scrollLeft++; } } var MyMar=setInterval(Marquee,speed); imgbox.onmouseover=function(){clearInterval(MyMar)} imgbox.onmouseout=function(){MyMar=setInterval(Marquee,speed)} // --></mce:script>
相关文章推荐
- 图片无缝滚动代码(DIV+CSS+JavaScript)
- DIV+CSS+JS实现图片<ul><li></li></ul>无缝滚动代码
- DIV+CSS+JS实现图片<ul><li></li></ul>无缝滚动代码
- CSS+Div图片横向滚动代码
- div+css布局的图片连续滚动js实现代码
- div+css+js实现无缝滚动类似marquee无缝滚动代码
- div+css布局的图片连续滚动js实现代码
- div+css+javascript 实现无缝滚动,marquee无缝滚动,无缝滚动,兼容firefox
- div图片水平垂直居中不随滚动条滚动的CSS代码(兼容IE8+)
- 图片横向不间断滚动代码(div+css)
- JS+CSS控制图片向上无缝滚动代码
- 几个div+css图片滚动显示的代码
- JS+CSS控制左右切换鼠标可控的无缝图片滚动代码
- 图片无缝无间隙滚动代码 DIV+script
- div+css+js无缝滚动代码
- 一款JS+CSS实现的无缝平滑图片滚动代码
- 几个div+css图片滚动显示的代码
- 图片无缝滚动(div+css)
- div+css+jQuery图片横向滚动代码(带左右点击按钮)
- 图片无缝无间隙滚动代码 DIV+script