怎麽在滚动的图片动加入连接代码
- 提问者网友:像風在裏
- 2021-04-22 12:11
- 五星知识达人网友:第幾種人
- 2021-04-22 13:28
在head标签下加上
<link rel="stylesheet" href="css/default.css" type="text/css">
img src="";
- 1楼网友:醉吻情书
- 2021-04-22 17:59
你如果做出滚动效果,那你只需在图片前加<a href="链接地址"></a>就可以了
- 2楼网友:逃夭
- 2021-04-22 16:57
<!--滚动图片 开始 --> <table width=730 border=0 align="center" cellpadding=0 cellspacing=0> <tr> <td> <div id=demo > <table align=left cellpadding=0 cellspace=0 border=0> <tr> <td id=demo1 valign=top> <table border=0 cellpadding=0 cellspacing=0> <tr> <td><a href= http://www.35line.cn target=_blank><img src="images/adv/fj001.jpg" width=86 height=86 border="0"></a><br> <center>说明一</center></td> <td width="6"> </td> <td><a href= http://www.35line.cn target=_blank><img src="images/adv/fj002.jpg" width=86 height=86 border="0"></a><br> <center>说明二</center></td> <td width="6"> </td> <td><a href= http://www.35line.cn target=_blank><img src="images/adv/fj003.jpg" width=86 height=86 border="0"></a><br> <center>说明三</center></td> <td width=6> </td> <td><a href= http://www.35line.cn target=_blank><img src="images/adv/fj004.jpg" width=86 height=86 border="0"></a><br> <center>说明四</center></td> <td width=6> </td> <td><a href= http://www.35line.cn target=_blank><img src="images/adv/fj005.jpg" width=86 height=86 border="0"></a><br> <center>说明五</center></td> <td width=6> </td> <td><a href= http://www.35line.cn target=_blank><img src="images/adv/fj006.jpg" width=86 height=86 border="0"></a><br> <center>说明六</center></td> <td width=6> </td> <td><a href= http://www.35line.cn target=_blank><img src="images/adv/fj007.jpg" width=86 height=86 border="0"></a><br> <center>说明七</center></td> <td width=6> </td> <td><a href= http://www.35line.cn target=_blank><img src="images/adv/fj008.jpg" width=86 height=86 border="0"></a><br> <center>说明八</center></td> </tr> </table> </td> <td id=demo2 valign=top></td> </tr> </table> </div> </td> </tr> </table> <script> var speed=20//速度数值越大速度越慢 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> <!--滚动图片 结束 -->
其中href=后面的就是你要连接的地址.你可以自己改你要连接的.src=后面是你的图片路径.
- 3楼网友:不甚了了
- 2021-04-22 15:35
这个就是在代码里面加个鼠标效果 例如:<marquee direction="up" width="190" height="80" scrollamount="3" scrolldelay="120" onMouseOver="this.stop()" onMouseOut="this.start()">
起作用的代码是onMouseOver="this.stop()" onMouseOut="this.start()" 这两个。
- 4楼网友:青尢
- 2021-04-22 15:06