在html中用标记能让图片滚动起来,但怎样才能让图片首尾相接的滚动呢?
回复讨论(解决方案)
http://www.wjdy666.com/index.shtml
这里有个,自己扣,懒得弄了
百度一下就知道!! 接分来的
帮你把代码摘出来了
<script> <br /> var oMarquee = document.getElementById("mypic"); //滚动对象 <br /> var iLineHeight = 156; //单行高度,像素 <br /> var iLineCount = 7; //实际行数 <br /> var iScrollAmount = 1; //每次滚动高度,像素 <br /> function run() { <br /> oMarquee.scrollLeft += iScrollAmount; <br /> if ( oMarquee.scrollLeft == iLineCount * iLineHeight ) <br /> oMarquee.scrollLeft = 0; <br /> if ( oMarquee.scrollLeft % iLineHeight == 0 ) { <br /> window.setTimeout( "run()", 1 ); <br /> } else { <br /> window.setTimeout( "run()", 1); <br /> } <br /> } <br /> oMarquee.innerHTML += oMarquee.innerHTML; <br /> window.setTimeout( "run()", 1 ); <br /> </script>
marquee 左右来回滚动可以无缝
也同样纠结中