首  页  |  酷站  |  精品网站  |  原创作品秀  |  网络学院   |  信息中心  |  艺术设计  |  求职招聘  |  建站资源  |  服装网站  |  论坛  |  设计部落  |  网站综合
个人网页  商业网站  业界动态  设计赛事  网站资源  下载专区  设计欣赏  CG-插画  JS特效  娱乐  国际品牌  知名品牌  服装院校  专题欣赏  SEO  BANNER
域名注册 虚拟主机 广州网站建设 广州网页设计 IDC赞助 设计资源下载 虚拟主机 域名注册 品牌网站建设 服装品牌网站建设 广告服务 网站推广 娱乐
当前位置:首 页 >> JS特效 >> 图形图象类 >> 又一种符合网页标准的图片擦洗特效

又一种符合网页标准的图片擦洗特效


中资源
转载请注明出处-中国设计秀-cnwebshow.com

<!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>
<title></title><style type="text/css">
<!--
#f_div{width:150px; height:100px; margin:0 auto; overflow:hidden;}
#f_imgDiv{width:100%; height:100px; overflow:hidden;}
#f_img{filter:progid:DXImageTransform.Microsoft.Fade(Overlap=1.00); border:0;}
#f_infoDiv{width:100%;top:-20px !important;top:-22px; position:relative;}
#f_buttonDiv{width:100%; margin-right:1px; height:21px; overflow:hidden; text-align:left;}
#f_line{width:100%;height:1px;background:#fff; overflow:hidden;filter:progid:DXImageTransform.Microsoft.Alpha(startX=0, startY=0, finishX=50, finishY=100,style=1,opacity=0,finishOpacity=100)}
#f_buttonDiv div{width:1px;height:21px; background:#fff; float:right;}
#f_buttonDiv .bg{width:21px; height:21px; background:#fff; float:right; filter:Alpha(Opacity=40);}
#f_buttonDiv a{width:21px;height:15px !important;height:17px;float:right;padding-top:5px;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:#000;}
#f_buttonDiv a:hover{background:#FF840C;color:#fff;}
#f_buttonDiv a.on:link,#f_buttonDiv a.on:visited,#f_buttonDiv a.on:active,#f_buttonDiv a.on:hover{background:#FF840C;color:#fff;}
#f_buttonDiv a.on:hover{background:#FF6600;}
#f_text{height:20px; line-height:20px; overflow:hidden;text-align:center;}
#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;}
-->
</style>
</head>
<body>
<div id="ad_pic">
<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 language="javascript" type="text/javascript">
<!--
//more javascript from http://www.webjx.com

function p $(string){
 document.write(string);
}
function  $(id){
 return document.getElementById(id);
}
function change_menu(id,content_id,num,total_ztc_menu,menu_on,menu_off){
 for (var i=1;i<=total_ztc_menu;i++){
   $(id+i).className=menu_off; 
   $(content_id+i).style.display='none';    
 }
  $(id+num).className=menu_on;
  $(content_id+num).style.display='block';               
}
//可修改区域
var imgWidth=150;
var imgHeight=100;
var _timeOut_=5000;
var show_text = false; //是否显示焦点文字
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;  


//菜单menu
menuList[++n]='XX';
imgUrl[n]='http://www.webjx.com/img/200406301.jpg';
imgText[n]='<a href="#" target="_blank">内容一</a>';
imgLink[n]='http://www.webjx.com';
imgAlt[n]='内容一';

//菜单menu
menuList[++n]='XX';
imgUrl[n]='http://www.webjx.com/img/200406302.jpg';
imgText[n]='<a href="#" target="_blank">内容二</a>';
imgLink[n]='http://www.webjx.com';
imgAlt[n]='内容二';

//菜单menu
menuList[++n]='XX';
imgUrl[n]='http://www.webjx.com/img/200406303.jpg';
imgText[n]='<a href="#" target="_blank">内容三</a>';
imgLink[n]='http://www.webjx.com';
imgAlt[n]='内容三';

//菜单menu
menuList[++n]='XX';
imgUrl[n]='http://www.webjx.com/img/200406304.jpg';
imgText[n]='<a href="#" target="_blank">内容四</a>';
imgLink[n]='http://www.webjx.com';
imgAlt[n]='内容四';


var count=0;
for (var i=0;i<imgUrl.length;i++) {
if( (imgUrl[i]!="") && (imgText[i]!="")&& (imgLink[i]!="")&& (imgAlt[i]!="")) {
 count++;
} else {
 break;
}
}
//重写css
var each_width=Math.ceil((imgWidth-(count-1))/count);
var last_width=imgWidth-each_width*(count-1)-(count)+1;

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=count-1;i>=0;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>
</body>
</html>

转载请注明出处-中国设计秀-cnwebshow.com



投稿 】【对本文进行评论】 【字体: 】【发布于2007-05-05 11:35】

相关专题:暂无相关专题

上一篇:图片透明效果   下一篇:符合网页标准的连续滚动的图片特效代码
 认证LOGO下载
     
Copyright © 2005-2007 中国设计秀_网页设计教程_优秀网页设计欣赏_平面设计欣赏 All Right Reserved.
做最专业的设计服务网站,秀出自我,秀出精彩!中国设计秀,秀---无处不在!!
QQ:54292427  8208442 MSN:kingvisual#hotmail.com 交流群:9107036 3848215 8850631
粤ICP备05067046号 RSS