中文(繁体)
效果不錯的圖片切換特效,太平洋女性網圖片特效,終於扒出來了! !如果有喜歡的就留著用吧!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http ://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>太平洋女性網圖片展示特效代碼downcodes.com編輯</title> <META NAME="description" CONTENT="太平洋女性網圖片展示特效代碼downcodes.com編輯" /> <META NAME="keywords" CONTENT="太平洋女性網圖片展示特效代碼downcodes.com編輯" /> <style type="text/css"> <!-- /*焦點圖切換*/ #f_div{width:325px; height:225px; margin:0 auto; overflow:hidden;} # f_imgDiv{width:100%; height:225px; overflow:hidden;} #f_img{filter:progid:DXImageTransform.Microsoft.Fade(Overlap=1.00); border:0;} #f_infoDiv{width:16ptopxtopx; ; left:305px; height:120px; position:relative;} #f_buttonDiv{width:12px; height:160px; overflow:hidden; text-align:left;} #f_buttonDiv div{width:1px; hidden;} #f_buttonDiv .bg{width:12px; height:12px; background:#666; float:right; filter:Alpha(Opacity=40); overflow:hidden;} #f_buttonDiv a{width:12px; ;line-height:13px;color:#fff;font-family:Arial, Helvetica, sans-serif;font-size:10px;text-align:center;display:block;overflow:hidden;text-decoration:none; position:absolute;} #f_buttonDiv a:link,#f_buttonDiv a:visited,#f_buttonDiv a:active{color:#FFF;} #f_buttonDiv a:hover{background:#DE97B7;color:#fff;} #f_buttonDiv a. on:link,#f_buttonDiv a.on:visited,#f_buttonDiv a.on:active,#f_buttonDiv a.on:hover{background:#D285A7;} #f_buttonDiv a.on:hover{background:#DE97B7;} #f_text {height:26px; line-height:26px; overflow:hidden;text-align:left; font-weight:bold; background:url(/u/info_img/2009-06/20/jt7.gif) no-repeat 10px 8px; text-indent:20px;} #f_text a:link,#f_text a:visited,#f_text a:active{color:#000;text-decoration: none;} #f_text a:hover{color:#FF6600; text-decoration: none;} body {background: #fff;margin: 0px; font-size:12px;} .f14 {font-size:14px;} a:link,a:visited,a:active{color:# 000;text-decoration: none;} a:hover{ color:#E64393;text-decoration: none;} a:hover{ color:#E64393;text-decoration: none;} .white a:link,.white a:visited,.white a:active{color:#FFFFFF;text- decoration: none;} .white a:hover{ color:#FFFFFF;text-decoration: none;} .white2,.white2 a:link,.white2 a:visited,.white2 a:active{color:#FFF;text -decoration: none;} .white2 a:hover{ color:#000;text-decoration: none;} .gray2,.gray2 a:link,.gray2 a:visited,.gray2 a:active{color:#000; text-decoration: none;} .gray2 a:hover{ color:#E64393;text-decoration: none;} .green,.green a:link,.green a:visited,.green a:active{color:#008100 ;text-decoration: none;} .green a:hover{ color:#E64393;text-decoration: none;} #body1_1_1 {float: left;width: 333px;background-color: #F1F1F1; border-leftD solid 2px;} #body1_1_1_a {height: 226px;width: 325px;margin: 4px 0 0 4px;} --> </style> </head> <body> <div id="body1_1_1"> <div id=" body1_1_1_a"> <div id="f_div"> <!--圖片區域--> <div id="f_imgDiv"></div> <div id="f_infoDiv"> <!--數字按鈕區域--> <div id="f_buttonDiv"></div> </div> </div> <!--焦點文字區域--> <div id="f_text" class="f12b"></div> <script> //可修改區域var imgWidth=325; var imgHeight=225; var _timeOut_=5000; var show_text = true; //是否顯示焦點文字var timeOut=_timeOut_; var timeOut2=_timeOut_/2;//onmouseout img後需要切換的時間var now=0; //第一張圖var target="_blank"; //開啟方式var button_on ='on'; //當前焦點對應按鈕的樣式名var button_off ='';//非當前焦點對應按鈕的樣式名稱//不可修改區域var imgUrl = new Array(); var imgText = new Array(); var imgLink = new Array(); var imgAlt= new Array(); //var menuList = new Array ();//選單menu var ver=2; //相容瀏覽器版本預設2 為非ie var firstTime=true; var n =-1; imgUrl[++n]='/u/info_img/2009-06 /20/20070720nrydbzd.jpg'; imgText[n]='<a href="http://www.downcodes.com" target="_blank">20招做個「電臀」美女</a>'; imgLink[n]='http://www.downcodes.com'; imgAlt[n]='20招做「電臀」美女'; imgUrl[++n]='/u/info_img/2009-06 /20/200707191346247f307946246c4.jpg'; imgText[n]='<a href="http://www.downcodes.com" target="_blank">男人不知道的有關女人的十六件事</a> '; imgLink[n]='http://www.downcodes.com'; imgAlt[n]='男人不知道的有關女人的十六件事'; imgUrl[++n]='/u/info_img /2009-06/20/wjy0720-4.jpg'; imgText[n]='<a href="http://www.downcodes.com" target="_blank">時尚mm巧搭配服飾潮人就是你? ! </a>'; imgLink[n]='http://www.downcodes.com'; imgAlt[n]='時尚mm巧搭配服飾潮人就是你? ! '; imgUrl[++n]='/u/info_img/2009-06/20/20070720pclady001.jpg'; imgText[n]='<a href="http://www.downcodes.com" target=" _blank">暑假約會必勝妝無往不利</a>'; imgLink[n]='http://www.downcodes.com'; imgAlt[n]='暑假約會必勝妝無往不利'; imgUrl[++ n]='/u/info_img/2009-06/20/325nvxingdajiaodiantupianweizi.JPG'; imgText[n]='<a href="http://www.downcodes.com" target="_blank">男生最感動服飾搭配清單</a>'; imgLink[n]='http://www.downcodes.com'; imgAlt[n]='男生最心動服飾搭配清單'; imgUrl[++n]=''; imgText[n]='<a href="http://www.downcodes.com" target="_blank">薇姿清怡細膚全民體驗</a>'; imgLink[n]='http:/ /www.downcodes.com'; imgAlt[n]='薇姿清怡細膚全民體驗中'; var count=0; for (i=0;i<imgUrl.length;i++) { if( (imgUrl[i ]!="") && (imgText[i]!="")&& (imgLink[i]!="")&& (imgAlt[i]!="")) { count++; } else { break; } } function p$(string){ document.write(string); } function $(id){ return document.getElementById(id); } //固定圖片size p$("<style> #f_img { width:"+imgWidth+ "px;height:"+imgHeight+"px;</style>"); function change(){ if (ver==1){ with($('f_img').filters[0]){ Transition=1; apply(); play(); } } if (firstTime){ firstTime=false;timeOut=_timeOut_/1000;} else{ $('f_img').src=imgUrl[now]; $('f_img').alt =imgAlt[now]; $('f_imgLink').href=imgLink[now]; if (show_text) $('f_text').innerHTML=imgText[now]; for (var i=0;i<count;i++ ) { $('b'+i).className="button"; //$('f_menu'+i).className=""; } $('b'+now).className="on"; / /$('f_menu'+now).className="on"; now=(now>=imgUrl.length-1)?0:now+1; timeOut=_timeOut_; } theTimer=setTimeout("change()", timeOut); } function b_change(num){ window.clearInterval(theTimer); now=num; firstTime=false; change(); } //draw 漸變line (即css:f_line) function draw_line(){ var div = document .createElement("div"); div.id = 'f_line'; $('f_infoDiv').insertBefore(div,$('f_infoDiv').childNodes.item(0)); } //表現層start //圖片var a = document.createElement("a"); a.id="f_imgLink"; a.target=target; a.href=imgLink[now]; $('f_imgDiv').appendChild(a); var img = document.createElement("img"); img.id="f_img"; img.width=imgWidth; img.height=imgHeight; img.src=imgUrl[now]; img.alt=imgAlt[now]; a. appendChild(img); //數字按鈕for (var i=0;i<count;i++){ var div_bg = document.createElement("div"); div_bg.id = 'div_bg'+i; div_bg.className=' bg'; $('f_buttonDiv').appendChild(div_bg); var a = document.createElement("a"); a.id = 'b'+i; a.className = (i==now+1)? "button_on":"button_off"; a.title=imgAlt[i]; a.innerHTML=i+1; a.href='javascript:b_change('+i+')'; $('div_bg'+i). appendChild(a); var div= document.createElement("div"); $('f_buttonDiv').appendChild(div); } if (show_text) $('f_text').innerHTML = imgText[now]; //表現層end $('f_img').onmouseover=function(){window.clearInterval(theTimer);} $('f_img').onmouseout=function(){theTimer=setTimeout("Out()", timechange2); } try{ //濾鏡版本new ActiveXObject("DXImageTransform.Microsoft.Fade"); $('f_img').filters[0].play(); ver=1; draw_line(); } catch (e){ ver=2;} var theTimer = setTimeout("change()", _timeOut_/1000); </script> </div> </div> </body> </html>