图片加文字说明PPT效果 dn001 2009-06-21 08:52:58 效果不错的图片切换特效,太平洋女性网图片特效,终于扒出来了!!如果有喜欢的就留着用吧! <!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>太平洋女性网图片展示特效代码knowsky.com编辑</title> <META NAME="description" CONTENT="太平洋女性网图片展示特效代码knowsky.com编辑" /> <META NAME="keywords" CONTENT="太平洋女性网图片展示特效代码knowsky.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:16px;top:-115px; left:305px; height:120px; position:relative;} #f_buttonDiv{width:12px; height:160px; overflow:hidden; text-align:left;} #f_buttonDiv div{width:1px;height:7px; overflow:hidden;} #f_buttonDiv .bg{width:12px; height:12px; background:#666; float:right; filter:Alpha(Opacity=40); overflow:hidden;} #f_buttonDiv a{width:12px;height: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(http://www.pclady.com.cn/images/07/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;} .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-left: #D4D4D4 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]='http://www.pclady.com.cn/fitness/sx/stern/images/picpath/555.jpg'; imgText[n]='<a href="http://www.knowsky.com" target="_blank">20招做个“电臀”美女</a>'; imgLink[n]='http://www.knowsky.com'; imgAlt[n]='20招做个“电臀”美女'; imgUrl[++n]='http://www.pclady.com.cn/love/relationships/her_love/images/picpath/20070720nrydbzd.jpg'; imgText[n]='<a href="http://www.knowsky.com" target="_blank">男人不知道的有关女人的十六件事</a>'; imgLink[n]='http://www.knowsky.com'; imgAlt[n]='男人不知道的有关女人的十六件事'; imgUrl[++n]='http://www.pclady.com.cn/null/images/picpath/200707191346247f307946246c4.jpg'; imgText[n]='<a href="http://www.knowsky.com" target="_blank">时尚mm巧搭配 服饰潮人就是你?! </a>'; imgLink[n]='http://www.knowsky.com'; imgAlt[n]='时尚mm巧搭配 服饰潮人就是你?! '; imgUrl[++n]='http://www.pclady.com.cn/beauty/makeup/trend/images/picpath/wjy0720-4.jpg'; imgText[n]='<a href="http://www.knowsky.com" target="_blank">暑假约会必胜妆 无往不利</a>'; imgLink[n]='http://www.knowsky.com'; imgAlt[n]='暑假约会必胜妆 无往不利'; imgUrl[++n]='http://www.pclady.com.cn/dress/dpgw/images/picpath/20070720pclady001.jpg'; imgText[n]='<a href="http://www.knowsky.com" target="_blank">男生最心动服饰搭配清单</a>'; imgLink[n]='http://www.knowsky.com'; imgAlt[n]='男生最心动服饰搭配清单'; imgUrl[++n]='http://image.pconline.com.cn/bj/070717/325nvxingdajiaodiantupianweizi.JPG'; imgText[n]='<a href="http://www.knowsky.com" target="_blank">薇姿清怡细肤全民体验中</a>'; imgLink[n]='http://www.knowsky.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("change()", timeOut2);} 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>