求图片向左无缝滚动带停顿的代码。。
- 提问者网友:爱了却不能说
- 2021-04-23 08:24
- 五星知识达人网友:迟山
- 2021-04-23 08:59
这有一个通用不间断滚动的JS封装类,各种图片文字滚动效果都有,向上,向下,左右,都有,无缝的,间歇滚动的,好多,你自己看吧,最下面有下载源码的地址,你可以下载下来,上面也有详细的注释。
http://www.abaonet.com/demo/codeR/d1816/MSClass.html
- 1楼网友:零点过十分
- 2021-04-23 10:23
没有分,没有分,上分吧!
- 2楼网友:夜风逐马
- 2021-04-23 09:55
<style type="text/css"> <!-- .STYLE1 { color: #FF0000; font-weight: bold; } --> </style> <table width="100%" border="1" bordercolor="#006600"> <tr>
</tr> <tr> <td><marquee direction=up TrueSpeed scrollAmount=1
scrollDelay=80 height=120
width=240 border="0">
<span class="STYLE1"><br> 文字 </span> </marquee> </td> <td colspan="2"><div id="demo" style="overflow:hidden;height:100%;width:100%;color:#ffffff"> <table width="100%" height="100%" border="0" align="left" cellpadding="0" cellspace="0"> <tr> <td id="demo1" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"
bordercolor="#D4D0C8"> <tr> <td><div align="center"><a href="http:///images/200909/goods_img/58_G_1252175911944.jpg"><img
src="http:///images/200909/goods_img/58_G_1252175911944.jpg" width="120" height="120" border="0" /></a></div></td> <td><div align="center"><a href="http:///images/200908/goods_img/46_G_1251400004591.jpg"><img
src="http:///images/200908/goods_img/46_G_1251400004591.jpg" width="120" height="120" border="0" /></a></div></td> <td><div align="center"><a href="http:///images/200909/goods_img/57_G_1251902025193.jpg"><img
src="http:///images/200909/goods_img/57_G_1251902025193.jpg" width="120" height="120" border="0" /></a></div></td> <td><div align="center"><a href="http:///images/200908/goods_img/50_G_1251398661535.jpg"><img
src="http:///images/200908/goods_img/50_G_1251398661535.jpg" width="120" height="120" border="0" /></a></div></td> <td><div align="center"><a href="http:///images/200908/goods_img/51_G_1251400332526.jpg"><img
src="http:///images/200908/goods_img/51_G_1251400332526.jpg" width="120" height="120" border="0" /></a></div></td> <td><div align="center"><a href="http:///images/200908/goods_img/45_G_1251388000718.jpg"><img
src="http:///images/200908/goods_img/45_G_1251388000718.jpg" width="120" height="120" border="0" /></a></div></td> <td><div align="center"><a href="http:///images/200909/goods_img/55_G_1251898732872.jpg"><img
src="http:///images/200909/goods_img/55_G_1251898732872.jpg" width="120" height="120" border="0" /></a></div></td> <td><div align="center"><a href="http:///images/200909/goods_img/60_G_1254328397256.jpg"><img
src="http:///images/200909/goods_img/60_G_1254328397256.jpg" width="120" height="120" border="0" /></a></div></td> </tr> <tr> <td><div align="center"><a href="http:///goods.php?id=58">文字</a></div></td> <td><div align="center"><a href="http:///goods.php?id=46">文字</a></div></td> <td><div align="center"><a href="http:///goods.php?id=57">文字</a></div></td> <td><div align="center"><a href="http:///goods.php?id=50">文字</a></div></td> <td><div align="center"><a href="http:///goods.php?id=51">文字</a></div></td> <td><div align="center"><a href="http:///goods.php?id=45">文字</a></div></td> <td><div align="center"><a href="http:///goods.php?id=60">文字</a></div></td> <td><div align="center"><a href="http:///goods.php?id=60">文字</a></div></td> </tr> </table></td> <td id="demo2" valign="top"></td> </tr> </table> </div> <script> var speed=10//速度数值越大速度越慢 demo2.innerHTML=demo1.innerHTML function Marquee(){ if(demo2.offsetWidth-demo.scrollLeft<=0) demo.scrollLeft-=demo1.offsetWidth else{ demo.scrollLeft++ } } var MyMar=setInterval(Marquee,speed) demo.onmouseover=function() {clearInterval(MyMar)} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} </script></TD> </TR></TABLE>