网站建设网中插入图片实现滚动代码Word文件下载.docx
- 文档编号:18845752
- 上传时间:2023-01-01
- 格式:DOCX
- 页数:5
- 大小:14.87KB
网站建设网中插入图片实现滚动代码Word文件下载.docx
《网站建设网中插入图片实现滚动代码Word文件下载.docx》由会员分享,可在线阅读,更多相关《网站建设网中插入图片实现滚动代码Word文件下载.docx(5页珍藏版)》请在冰豆网上搜索。
100;
width:
90;
>
divid=butong_net_top1>
imgsrc="
插入需要滚动的图片"
/div>
divid=butong_net_top2>
script>
varspeed=30
butong_net_top2.innerHTML=butong_net_top1.innerHTML//克隆butong_net_top1为butong_net_top2
functionMarquee1(){
//当滚动至butong_net_top1与butong_net_top2交界时
if(butong_net_top2.offsetTop-butong_net_top.scrollTop<
=0)&
60;
&
butong_net_top.scrollTop-=butong_net_top1.offsetHeight//butong_net_top跳到最顶端
else{
butong_net_top.scrollTop++;
}
varMyMar1=setInterval(Marquee1,speed)//设置定时器
//鼠标移上时清除定时器达到滚动停止的目的
butong_net_top.onmouseover=function(){clearInterval(MyMar1)}
//鼠标移开时重设定时器
butong_net_top.onmouseout=function(){MyMar1=setInterval(Marquee1,speed)}
/script>
--向上滚动代码结束-->
br>
--下面是向下滚动代码-->
divid=butong_net_bottomstyle=overflow:
divid=butong_net_bottom1>
divid=butong_net_bottom2>
butong_net_bottom2.innerHTML=butong_net_bottom1.innerHTML
butong_net_bottom.scrollTop=butong_net_bottom.scrollHeight
functionMarquee2(){
if(butong_net_bottom1.offsetTop-butong_net_bottom.scrollTop>
=0)
butong_net_bottom.scrollTop+=butong_net_bottom2.offsetHeight
butong_net_bottom.scrollTop--
varMyMar2=setInterval(Marquee2,speed)
butong_net_bottom.onmouseover=function(){clearInterval(MyMar2)}
butong_net_bottom.onmouseout=function(){MyMar2=setInterval(Marquee2,speed)}
--向下滚动代码结束-->
--下面是向左滚动代码-->
divid="
butong_net_left"
style="
overflow:
500px;
"
tablecellpadding="
0"
cellspacing="
border="
tr>
tdid="
butong_net_left1"
valign="
top"
align="
center"
2"
tralign="
td>
/td>
/tr>
/table>
butong_net_left2"
varspeed=30//速度数值越大速度越慢
butong_net_left2.innerHTML=butong_net_left1.innerHTML
functionMarquee3(){
if(butong_net_left2.offsetWidth-butong_net_left.scrollLeft<
butong_net_left.scrollLeft-=butong_net_left1.offsetWidth
butong_net_left.scrollLeft++
varMyMar3=setInterval(Marquee3,speed)
butong_net_left.onmouseover=function(){clearInterval(MyMar3)}
butong_net_left.onmouseout=function(){MyMar3=setInterval(Marquee3,speed)}
--向左滚动代码结束-->
--下面是向右滚动代码-->
butong_net_right"
butong_net_right1"
butong_net_right2"
butong_net_right2.innerHTML=butong_net_right1.innerHTML
functionMarquee4(){
if(butong_net_right.scrollLeft<
butong_net_right.scrollLeft+=butong_net_right2.offsetWidth
butong_net_right.scrollLeft--
varMyMar4=setInterval(Marquee4,speed)
butong_net_right.onmouseover=function(){clearInterval(MyMar4)}
butong_net_right.onmouseout=function(){MyMar4=setInterval(Marquee4,speed)}
--向右滚动代码结束-->
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 网站 建设 插入 图片 实现 滚动 代码