网页设计JS幻灯片特效.doc_第1页
网页设计JS幻灯片特效.doc_第2页
网页设计JS幻灯片特效.doc_第3页
网页设计JS幻灯片特效.doc_第4页
网页设计JS幻灯片特效.doc_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

展播/* Reset style */* margin:0; padding:0; word-break:break-all; body background:#FFF; color:#333; font:12px/1.6em Helvetica, Arial, sans-serif; h1, h2, h3, h4, h5, h6 font-size:1em; a color:#0287CA; text-decoration:none; a:hover text-decoration:underline; ul, li list-style:none; fieldset, img border:none; legend display:none; em, strong, cite, th font-style:normal; font-weight:normal; input, textarea, select, button font:12px Helvetica, Arial, sans-serif; table border-collapse:collapse; html overflow:-moz-scrollbars-vertical; /*Always show Firefox scrollbar*/* iFocus style */#ifocus width:800px; height:520px; margin:20px; border:1px solid #DEDEDE; background:#F8F8F8; #ifocus_pic display:inline; position:relative; float:left; width:670px; height:502px; overflow:hidden; margin:10px 0 0 10px; #ifocus_piclist position:absolute;height: 5300px;/*这里使用的是670*502的照片*/ #ifocus_piclist li width:670px; height:502px; overflow:hidden; #ifocus_piclist img width:670px; height:502px; #ifocus_btn display:inline; float:right; width:91px; margin:9px 9px 0 0; #ifocus_btn li width:91px; height:57px; cursor:pointer; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); /*这里的小照片大小设置为67*50*/ #ifocus_btn img width:67px; height:50px; margin:11px 0 0 11px; #ifocus_btn .current opacity:1; -moz-opacity:1; filter:alpha(opacity=100); #ifocus_opdiv position:absolute; left:0; bottom:0; width:410px; height:35px; background:#000; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); #ifocus_tx position:absolute; left:8px; bottom:8px; color:#FFF; #ifocus_tx .normal display:none; function $(id) return document.getElementById(id); function addLoadEvent(func) var oldonload = window.onload; if (typeof window.onload != function) window.onload = func; else window.onload = function() oldonload(); func(); function moveElement(elementID,final_x,final_y,interval) if (!document.getElementById) return false; if (!document.getElementById(elementID) return false; var elem = document.getElementById(elementID); if (elem.movement) clearTimeout(elem.movement); if (!elem.style.left) elem.style.left = 0px; if (!elem.style.top) elem.style.top = 0px; var xpos = parseInt(elem.style.left); var ypos = parseInt(elem.style.top); if (xpos = final_x & ypos = final_y) return true; if (xpos final_x) var dist = Math.ceil(xpos - final_x)/10); xpos = xpos - dist; if (ypos final_y) var dist = Math.ceil(ypos - final_y)/10); ypos = ypos - dist; elem.style.left = xpos + px; elem.style.top = ypos + px; var repeat = moveElement(+elementID+,+final_x+,+final_y+,+interval+); elem.movement = setTimeout(repeat,interval);function classNormal(iFocusBtnID,iFocusTxID) var iFocusBtns= $(iFocusBtnID).getElementsByTagName(li); var iFocusTxs = $(iFocusTxID).getElementsByTagName(li); for(var i=0; i=2) iFocusBtns1.onmouseover = function() moveElement(ifocus_piclist,0,-502,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,1); if (listLength=3) iFocusBtns2.onmouseover = function() moveElement(ifocus_piclist,0,-1004,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,2); if (listLength=4) iFocusBtns3.onmouseover = function() moveElement(ifocus_piclist,0,-1506,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,3); if (listLength=5) iFocusBtns4.onmouseover = function() moveElement(ifocus_piclist,0,-2008,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,4); if (listLength=6) iFocusBtns5.onmouseover = function() moveElement(ifocus_piclist,0,-2510,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,5); if (listLength=7) iFocusBtns6.onmouseover = function() moveElement(ifocus_piclist,0,-3012,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,6); if (listLength=8) iFocusBtns7.onmouseover = function() moveElement(ifocus_piclist,0,-3514,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,7); if (listLength=9) iFocusBtns8.onmouseover = function() moveElement(ifocus_piclist,0,-4016,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,8); if (listLength=10) iFocusBtns9.onmouseover = function() moveElement(ifocus_piclist,0,-4518,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,9); setInterval(autoiFocus(),5000);var atuokey = false;function autoiFocus() if(!$(ifocus) return false; if(atuokey) return false; var focusBtnList = $(ifocus_btn).getElementsByTagName(li); var listLength = focusBtnList.length; for(var i=0; ilistLength; i+) if (focusBtnListi.className = current) var currentNum = i; if (currentNum=0&listLength!=1 ) moveElement(ifocus_piclist,0,-502,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,1); if (currentNum=1&listLength!=2 ) moveElement(ifocus_piclist,0,-1004,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,2); if (currentNum=2&listLength!=3 ) moveElement(ifocus_piclist,0,-1506,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,3); if (currentNum=3 ) moveElement(ifocus_piclist,0,0,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,0); if (currentNum=1&listLength=2 ) moveElement(ifocus_piclist,0,0,11); classNormal(ifocus_btn,ifocus_tx); classCurrent(ifocus_btn,ifocus_tx,0); if (current

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论