![JS网页图片播放效果之一[底部带缩略图].doc_第1页](http://file.renrendoc.com/FileRoot1/2020-1/22/2988089a-8df0-40fc-848a-711569816ee9/2988089a-8df0-40fc-848a-711569816ee91.gif)
![JS网页图片播放效果之一[底部带缩略图].doc_第2页](http://file.renrendoc.com/FileRoot1/2020-1/22/2988089a-8df0-40fc-848a-711569816ee9/2988089a-8df0-40fc-848a-711569816ee92.gif)
![JS网页图片播放效果之一[底部带缩略图].doc_第3页](http://file.renrendoc.com/FileRoot1/2020-1/22/2988089a-8df0-40fc-848a-711569816ee9/2988089a-8df0-40fc-848a-711569816ee93.gif)
![JS网页图片播放效果之一[底部带缩略图].doc_第4页](http://file.renrendoc.com/FileRoot1/2020-1/22/2988089a-8df0-40fc-848a-711569816ee9/2988089a-8df0-40fc-848a-711569816ee94.gif)
![JS网页图片播放效果之一[底部带缩略图].doc_第5页](http://file.renrendoc.com/FileRoot1/2020-1/22/2988089a-8df0-40fc-848a-711569816ee9/2988089a-8df0-40fc-848a-711569816ee95.gif)
免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
JS网页图片播放效果之一底部带缩略图昨天逛凤凰网看到视频主页上的图片播放效果挺好,模仿(仅样子)了下来,很久没有折腾这些,当作练习吧,与大家分享。一、效果图:二、背景图片下载: 保存为scrollpicbg.png三、测试要求: 1.将下面的代码保存为XXX.html文件。 2.下载上面的背景图,另外再弄7张图分名为1.jpg、2.jpg7.jpg,新建一个文件夹:images,将图片一起保存到里头。四、测试代码:!DOCTYPE html PUBLIC -/W3C/DTD XHTML 1.0 Transitional/EN /TR/xhtml1/DTD/xhtml1-transitional.dtdhtml xmlns=/1999/xhtmlheadmeta http-equiv=Content-Type content=text/html; charset=utf-8 /title无标题文档/titlestyle type=text/css.scrollPicBox height:375px; width:700px; border:1px solid #000;.scrollPicBox .movPicBg position:absolute; height:70px; margin-top:305px; background-color:#000; width:700px; z-index:300; filter:alpha(opacity=40);-moz-opacity:0.4; -khtml-opacity: 0.4; opacity: 0.4;.scrollPicBox .movPic position:absolute; height:70px; margin-top:305px; width:700px; z-index:301;.scrollPicBox #showpic height:375px; width:700px; background-color:#000.scrollPicBox a.prev height:70px; width:35px; float:left; display:block; background:url(images/scrollpicbg.png) no-repeat 5px 5px;.scrollPicBox a.prev:hoverheight:70px; width:35px; float:left; display:block; background:url(images/scrollpicbg.png) no-repeat -49px 5px;.scrollPicBox a.next height:70px; width:35px; float:right; display:block;background:url(images/scrollpicbg.png) no-repeat -22px 5px;.scrollPicBox a.next:hoverheight:70px; width:35px; float:right; display:block;background:url(images/scrollpicbg.png) no-repeat -78px 5px;.scrollPicBox .picbox height:70px; width:628px; float:left;.scrollPicBox #picbox a.a display:inline; float:left; height:54px; width:78px; margin-left:10px; background:url(images/scrollpicbg.png) -119px 0px;margin-top:6px;.scrollPicBox #picbox a.b display:inline; float:left; height:54px; width:78px; margin-left:10px; background:url(images/scrollpicbg.png) -202px 0px; margin-top:6px;filter:alpha(opacity=100);-moz-opacity:1; -khtml-opacity:1; opacity:1;.scrollPicBox #picbox img.aheight:44px; width:74px; border:1px; margin:8px 0px 0px 2px; filter:alpha(opacity=60);-moz-opacity:0.6; -khtml-opacity: 0.6; opacity: 0.6;.scrollPicBox #picbox img.bheight:44px; width:74px; border:1px; margin:8px 0px 0px 2px; filter:alpha(opacity=100);-moz-opacity:1; -khtml-opacity:1; opacity:1;/style/headbodydiv class=scrollPicBox div class=movPicBg/div div class=movPic a class = prev href=javascript:void(0) onclick=playPic(-1)/a div id=picbox a class=b href=javascript:void(0)img src=images/1.jpg height=44 width=74 border=0 /a a class=a href=javascript:void(0)img src=images/2.jpg height=44 width=74 border=0 /a a class=a href=javascript:void(0)img src=images/3.jpg height=44 width=74 border=0 /a a class=a href=javascript:void(0)img src=images/4.jpg height=44 width=74 border=0 /a a class=a href=javascript:void(0)img src=images/5.jpg height=44 width=74 border=0 /a a class=a href=javascript:void(0)img src=images/6.jpg height=44 width=74 border=0 /a a class=a href=javascript:void(0)img src=images/7.jpg height=44 width=74 border=0 /a /div a class = next href=javascript:void(0) onclick=playPic(1)/a /div div id=showpic img id=scrollPic src=images/1.jpg width=700 height=375/ /div/divscript language=javascriptvar nIndex = 0;var nAlpha = 0;function $(id)return document.getElementById(id);var arrImages = $(picbox).getElementsByTagName(img);var scrollPicTimer,scrollPicTimeout;for(i=0;iarrImages.length;i+)arrImagesi.className = a;arrImagesi.id = String(i);arrImagesi.onmouseover = function()nIndex = Number(this.id);setPicStyle(this);scrollPicTimer = setInterval(playPic(1),3000);function setPicStyle(o)for(i=0;iarrImages.length;i+)arrImagesi.className = a;arrImagesi.parentNode.className = a;o.className = b;o.parentNode.className = b;var pic = $(scrollPic);pic.src = o.src;clearInterval(scrollPicTimer);clearTimeout (scrollPicTimeout);nAlpha = 0;setAlpha();scrollPicTimer = setInterval(playPic(1),3000);function setAlpha()nAlpha += Math.ceil(100 - nAl
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年广东酒店管理职业技术学院高职单招职业技能测试近5年常考版参考题库含答案解析
- 2025年山西艺术职业学院高职单招(数学)历年真题考点含答案解析
- 《二十岁光阴不再来》
- T-CESA 1149-2021 人工智能芯片应用 面向病理图像分析辅助诊断系统的技术要求
- 2020年消防知识课件
- 椅子创意画课件
- 50618培训课件教学课件
- 肺炎患者的护理
- 口才专项班课件
- 国际物流运输合同范本
- 新教科版科学五年级下册分组实验报告单(原创共23个实验)
- 深度学习及自动驾驶应用 课件 第8、9章 基于Transformer的自动驾驶目标检测理论与实践、生成对抗网络及自动驾驶应用
- 东方财富在线测评题答案
- 铁路货车偏载偏重标准
- 2025届高考语文复习:古诗词鉴赏及答题技巧+课件
- 广东省高考物理考纲
- 动力厂房中央控制室锅炉房项目可行性研究报告-立项备案
- 【电石乙炔法制备氯乙烯的生产工艺设计9600字(论文)】
- 2024年学生团干部技能大赛考试题库350题(含答案)
- 2024年广东省惠州市惠城区中考一模英语试题(无答案)
- 小学打架安全教育主题班会
评论
0/150
提交评论