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'))" ); <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> html>