发新帖  新投票  回帖 
6492个阅读者,20条回复 | 打印 | 订阅 | 收藏
fly412

回复时间:2011-4-16 10:23
<HTML><TITLE>用代码做翻书效果</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">


<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<BODY onload=zyva()>
id=plaatjes>
class=cube src="http://img2.3lian.com/img2007/12/15/20.gif">
class=cube src="http://img2.3lian.com/img2007/12/15/22.gif">
class=cube src="http://img2.3lian.com/img2007/12/15/23.gif">

<SCRIPT language=JavaScript>
with (document.body) {
nx=offsetWidth
ny=offsetHeight
scroll="yes"
}

obj=0;
Haut=400;
Larg=400;
pt=0;
Nbi=0;
z=0
w1=0;
w2=0;
l1=0;
l2=0;
h1=0;
t1=0;
z=0

function mov() {
if(pt%2==0){
i1=obj[pt]
i2=obj[(pt+2)%Nbi]

i1.style.width=w1
i1.style.left=l1+Larg
i1.style.height=h1
if(!z){
z=1
i1.style.top=t1
i1.style.zIndex=2
}

i2.style.width=Larg
i2.style.left=l1+Larg-1
i2.style.height=Haut
i2.style.top=t1
i2.style.zIndex=1
}

else{
i2=obj[pt]
i1=obj[(Nbi+pt-2)%Nbi]

i2.style.width=w2
i2.style.left=l1+w1
i2.style.height=h1
i2.style.top=t1
if(!z){
z=1
i2.style.zIndex=pt+1
i1.style.zIndex=pt
}
}
w1+=-2
w2+=+2
lu1=w1*150/h1
lu2=w2*150/h1
i1.filters(0).Clear()
i1.filters(0).addAmbient (255,255,255,lu1)
i2.filters(0).Clear()
i2.filters(0).addAmbient (255,255,255,lu2)
if(w1<=0){
pt=(pt+1)%Nbi ;w1=w2;w2=0;
i1.style.left=-1000
if(pt%2==0)i1.style.zIndex=-2
z=0
}
}

function zyva() {
obj=plaatjes.all.tags("IMG")
Nbi=obj.length
h1=Haut
t1=10
w1=Larg
l1=10
w2=0
l2=Larg+l1
setTimeout('setInterval("mov()",1)',64)
}
</SCRIPT>
</BODY></HTML>




----------------------------------------------
我想我是海
 
发新帖 新投票
 回帖
查看积分策略说明快速回复主题
你的用户名: 密码:   免费注册(只要30秒)


启用 Html 代码
使用个人签名
(请您文明上网理性发言!并遵守相关规定
   



Processed in 0.020813 s, 8 q - 无图精简版,sitemap,