dreamweaver表格中插入的图片如何移动,要能连续的
- 提问者网友:鼻尖触碰
- 2021-07-21 12:22
- 五星知识达人网友:慢性怪人
- 2021-07-21 12:34
不会的话可以加QQ,我刚才亲自写了一个,欢迎你采用 ,里面有参数介绍。
<!--------------------demo start------------------>
<DIV id=demo style="OVERFLOW: hidden; WIDTH: 900px; COLOR: #e2f8f9; HEIGHT: 120px">
<TABLE cellPadding=0 width="100%" align=left border=0
cellspace="0">
<TBODY>
<TR>
<!--------------------demo1--------------------->
<TD id=demo1 vAlign=top>
<TABLE cellSpacing=1 cellPadding=1>
<TBODY>
<TR vAlign=top>
<TD vAlign=top noWrap>
<DIV align=right>
<TABLE cellSpacing=0 cellPadding=0 align=center border=0>
<TBODY>
<TR>
<TD align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=150
align=center border=0>
<TBODY>
<TR>
<TD align=middle height=100><A
href="#"
target=_blank><IMG height=98
src="图片.jpg" width=130
border=0></A></TD>
</TR>
<TR>
<TD class=nav1 align=middle height=20><A
class=apm2
href="#"
target=_blank>图片.jpg</A></TD>
</TR></TBODY></TABLE></TD>
<TD align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=150
align=center border=0>
<TBODY>
<TR>
<TD align=middle height=100><A
href="#"
target=_blank><IMG height=98
src="图片.jpg" width=130
border=0></A></TD>
</TR>
<TR>
<TD class=nav1 align=middle height=20><A
class=apm2
href="#"
target=_blank>图片.jpg</A></TD>
</TR></TBODY></TABLE></TD>
<TD align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=150
align=center border=0>
<TBODY>
<TR>
<TD align=middle height=100><A
href="#"
target=_blank><IMG height=98
src="图片.jpg" width=130
border=0></A></TD>
</TR>
<TR>
<TD class=nav1 align=middle height=20><A
class=apm2
href="#"
target=_blank>图片.jpg</A></TD>
</TR></TBODY></TABLE></TD>
<TD align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=150
align=center border=0>
<TBODY>
<TR>
<TD align=middle height=100><A
href="#"
target=_blank><IMG height=98
src="图片.jpg" width=130
border=0></A></TD>
</TR>
<TR>
<TD class=nav1 align=middle height=20><A
class=apm2
href="#"
target=_blank>图片.jpg</A></TD>
</TR></TBODY></TABLE></TD>
<TD align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=150
align=center border=0>
<TBODY>
<TR>
<TD align=middle height=100><A
href="#"
target=_blank><IMG height=98
src="图片.jpg" width=130
border=0></A></TD>
</TR>
<TR>
<TD class=nav1 align=middle height=20><A
class=apm2
href="#"
target=_blank>图片.jpg</A></TD>
</TR></TBODY></TABLE></TD>
<TD align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=150
align=center border=0>
<TBODY>
<TR>
<TD align=middle height=100><A
href="#"
target=_blank><IMG height=98
src="图片.jpg" width=130
border=0></A></TD>
</TR>
<TR>
<TD class=nav1 align=middle height=20><A
class=apm2
href="#"
target=_blank>图片.jpg</A></TD>
</TR></TBODY></TABLE></TD>
</TR></TBODY></TABLE>
</DIV></TD></TR></TBODY></TABLE></TD>
<!-------------------demo2--------------------->
<TD id=demo2 width="0"></TD>
</TR></TBODY></TABLE></DIV>
<!--------------------demo end------------------>
<SCRIPT>
var dir=1//每步移动像素,大=快
var speed=1//循环周期(毫秒)大=慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){//正常移动
//alert(demo2.offsetWidth+"\n"+demo.scrollLeft)
if (dir>0 && (demo2.offsetWidth-demo.scrollLeft)<=0) demo.scrollLeft=0
if (dir<0 &&(demo.scrollLeft<=0)) demo.scrollLeft=demo2.offsetWidth
demo.scrollLeft+=dir
demo.onmouseover=function() {clearInterval(MyMar)}//暂停移动
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}//继续移动
}
function r_left(){if (dir=-1)dir=1}//换向左移
function r_right(){if (dir=1)dir=-1}//换向右移
var MyMar=setInterval(Marquee,speed)
</SCRIPT>
- 1楼网友:逐風
- 2021-07-21 14:56
在网上找个不间断滚动代码即可
<table width="700" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td> <div id="www_qpsh_com" style="overflow: hidden; height: 120px; width: 700px; color: rgb(255, 0, 0);"> <table cellpadding="0" border="0" align="left" cellspace="0"> <tbody> <tr> <td valign="top" id="www_qpsh_com1"> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td><a href=" http://www.37kan.com/javascript/showpage2443.htm" target="_blank"><img width="150" hspace="22" height="100" border="0" alt="" src="/uploads/allimg/c090115/12320159A5F-1D93.jpg" /></a><br /><center><strong>说明一</strong></center></td> <td width="30"> </td> <td><a href=" http://www.37kan.com" target="_blank"><img width="150" hspace="22" height="100" border="0" alt="" src="/uploads/allimg/c090115/12320159B1P-23058.jpg" /></a><br /><center><strong>说明二</strong></center></td> <td width="30"> </td> <td><a href=" http://www.3sdo.com" target="_blank"><img width="150" hspace="22" height="100" border="0" alt="" src="/uploads/allimg/c090115/12320159C0P-3A26.jpg" /></a><br /><center><strong>说明三</strong></center></td> <td><a href=" http://www.sanguo5.com" target="_blank"><img width="150" hspace="22" height="100" border="0" alt="" src="/uploads/allimg/c090115/12320159E10-62555.jpg" /></a><br /><center><strong>说明四</strong></center></td> <td width="30"> </td> <td><a href=" http://www.pc555.com" target="_blank"><img width="150" hspace="22" height="100" border="0" alt="" src="/uploads/allimg/c090115/12320159D50-51048.jpg" /></a><br /><center><strong>说明五</strong></center></td> </tr> </tbody> </table> </td> <td valign="top" id="www_qpsh_com2"> </td> </tr> </tbody> </table> </div> <script> var speed=10//速度数值越大速度越慢 www_qpsh_com2.innerHTML=www_qpsh_com1.innerHTML function Marquee(){ if(www_qpsh_com2.offsetWidth-www_qpsh_com.scrollLeft<=0) www_qpsh_com.scrollLeft-=www_qpsh_com1.offsetWidth else{ www_qpsh_com.scrollLeft++ } } var MyMar=setInterval(Marquee,speed) www_qpsh_com.onmouseover=function() {clearInterval(MyMar)} www_qpsh_com.onmouseout=function() {MyMar=setInterval(Marquee,speed)} </script> </td> </tr> </tbody> </table>
- 2楼网友:行路难
- 2021-07-21 13:53