div+css+javascript 实现无缝滚动,marquee无缝滚动,无缝滚动,兼容firefox 用marquee实现首尾相连循环滚动效果(仅IE): 复制代码 代码如下: 这里是要滚动的内容 用div+css+javascript实现首尾相连循环滚动效果(兼容firefox): 复制代码 代码如下: div+css+javascript 实现无缝滚动,marquee无缝滚动,无缝滚动,兼容firefox <BR>#scrollobj { <BR>white-space: nowrap; <BR>overflow: hidden; <BR>width: 500px; <BR>} <BR> 这里是要滚动的内容 <BR><!-- <BR>function scroll(obj) { <br><br>/*往左*/ <BR>var tmp = (obj.scrollLeft)++; <BR>//当滚动条到达右边顶端时 <BR>if (obj.scrollLeft == tmp) { <BR>obj.innerHTML += obj.innerHTML; <BR>} <BR>//当滚动条滚动了初始内容的宽度时滚动条回到最左端 <BR>if (obj.scrollLeft >= obj.firstChild.offsetWidth) { <BR>obj.scrollLeft = 0; <BR>} <br><br>/*往上*/ <BR>//var tmp = (obj.scrollTop)++; <BR>//if (obj.scrollTop == tmp) { <BR>// obj.innerHTML += obj.innerHTML; <BR>//} <BR>//if (obj.scrollTop >= obj.firstChild.offsetWidth) { <BR>// obj.scrollTop = 0; <BR>//} <BR>} <BR>var _timer = setInterval("scroll(document.getElementById('scrollobj'))", 20); <BR>function _stop() { <BR>if (_timer != null) { <BR>clearInterval(_timer); <BR>} <BR>} <BR>function _start() { <BR>_timer = setInterval("_scroll(document.getElementById('scrollobj'))", 20); <BR>} <BR>//--> <BR>