免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1608 | 回复: 0
打印 上一主题 下一主题

js 幻灯片 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-17 09:54 |只看该作者 |倒序浏览

无标题文档
#focus_m{position:relative; width:420px; height:384px; background:#133775}
.f_img_roll{width:350px; height:300px; position:relative;}
.f_img_roll img{position:absolute; left:0; top:0; width:350px; height:300px;}
.f_img_tree{position:absolute; width:75px; height:300px; right:3px; top:0;}
.f_img_tree div{position:absolute; z-index:300; top:3px; right:0; width:75px; height:47px; background:url(http://www.kuanghong.com/han/images/mask.gif) no-repeat;}
.f_img_tree ul{margin:0; padding:0; list-style:none; position:absolute; right:0;}
.f_img_tree li{width:60px; height:45px; border:1px solid #0066cc; margin-top:3px;}
.f_img_tree img{width:54px; height:39px; border:3px solid #000066; vertical-align:top;}
.f_con{color:#fff; height:70px;}
.f_con .title{font-size:14px; height:30px; line-height:30px; margin-top:5px; font-weight:bold; text-align:center;}
.f_con .title a:link, .f_con .title a:visited{color:#fff; text-decoration:none}
.f_con .title a:hover{text-decoration:underline}
.f_con .con{font-size:12px; padding:0 10px; height:40px; line-height:150%;}

function $A(iterable) {
var results = [];
for (var i = 0; i ';
    this.lis[n].onmouseover= function(){ this.style.border = "1px solid #cc0000"; }
    this.lis[n].onmouseout= function(){ this.style.border = "1px solid #0066cc"; }
    this.lis[n].onclick    = function(){ if(oThis.lis[oThis.cur]!= this) oThis.nextFrame.call(oThis, this.n); }
    ul.appendChild(this.lis[n]);
    };
    ds.appendChild (this.mask);
    ds.appendChild (ul);
    break;
    case 'title':
    this.title    = ds;
    this.title.innerHTML    = this.imgs[0].title;
    this.title.parentNode.onmouseover= this.stop.bind(this);
    this.title.parentNode.onmouseout= this.start.bind(this);
    break;
    case 'con':
    this.con    = ds;
    this.con.innerHTML    = this.imgs[0].con;
    break;
}
},
nextFrame: function(n){
if(this.t)clearTimeout(this.t);
if(this.tm)clearInterval(this.tm);
if(this.ti)clearInterval(this.ti);
if(n)this.cur = n-1;
var top = 0, posTo = 0;
if(n!=0 && this.imgs[this.cur+1]){
posTo = this.lis[this.cur+1].offsetTop;
this.cur = this.cur+1;
}else{
posTo = this.lis[0].offsetTop;
this.cur = 0;
}
this.tem = this.mask.offsetTop;
this.tem > posTo? top = 1 : top = 0;
this.tm = setInterval(this.moveTo.bind(this, top, posTo), 25);
},
moveTo: function(top, posTo){
if(!top){
if((this.tem+2) >= posTo+1){
    clearInterval(this.tm);
    this.mask.style.top = posTo+'px';
    this.img_swap();
    return;
}
this.tem += (posTo - this.tem) * this.speed
}else{
if((this.tem-2)  this.img_m2.style.zIndex){
t = this.img_m;
b = this.img_m2;
}else{
t = this.img_m2;
b = this.img_m;
}
this.title.innerHTML= ''+this.imgs[this.cur].title+'';
this.con.innerHTML= this.imgs[this.cur].con;
b.src    = this.imgs[this.cur].max;
/MSIE/.test(navigator.userAgent) ?
this.tem = t.style.filter ? t.style.filter.replace(/^.+=(\d+).+$/,'$1') : 100
: this.tem = t.style.opacity ? t.style.opacity*100 : 100;
if(this.ti)clearInterval(this.ti);
this.ti= setInterval(this.img_hid.bind(this, t, b), 25);
},
img_hid: function(t,b){
this.tem -= 7;
if (/MSIE/.test(navigator.userAgent))
t.style.filter= 'alpha(opacity='+this.tem+')';
else
t.style.opacity = this.tem/100;
if(this.tem





本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/50970/showart_1419776.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP