<DIV id="scroll_div" style="OVERFLOW: hidden;WIDTH: 600px;white-space: nowrap; ">
<div id="scroll_begin" style="display:inline;">
<img src="images/2009413102511252.jpg" height="200px" />
<img src="images/200932215433498.jpg" height="200px" />
<img src="images/200941415253301.jpg" height="200px" />
<img src="images/200941415323204.jpg" height="200px" />
<img src="images/200941415366817.jpg" height="200px" />
<img src="images/200949133637467.jpg" height="200px" />
</DIV>
<div id="scroll_end" style="display:inline;"></DIV>
</div>
<SCRIPT>
var speed=1
var scroll_end = document.getElementById("scroll_end");
var scroll_div = document.getElementById("scroll_div");
scroll_end.innerHTML=scroll_begin.innerHTML
function Marquee(){
if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
scroll_div.scrollLeft-=scroll_begin.offsetWidth
else{
scroll_div.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
scroll_div.onmouseover=function() {clearInterval(MyMar)}
scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>
- 本文标题: HTML Marquee无空白滚动代码
- 文章分类:【HTML/CSS】
- 非特殊说明,本文版权归【胡同里的砖头】个人博客 所有,转载请注明出处.
- 上一篇:网站发布问题(同时存在于“c:\WINDOWS
- 下一篇: ASP.NET 通过网址传递中文值