欢迎来到天天文库
浏览记录
ID:37912701
大小:399.50 KB
页数:8页
时间:2019-06-02
《dreamweaver图片展示特效代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、
2、eight:80%;background:#000;}#screenimg{position:absolute;cursor:pointer;visibility:hidden;width:0px;height:0px;}#screen.tvover{border:solid#876;opacity:1;filter:alpha(opacity=100);}#screen.tvout{border:solid#fff;opacity:0.7;}#bankImages{display:none;}varLibra
3、ry={};Library.ease=function(){this.target=0;this.position=0;this.move=function(target,speed){this.position+=(target-this.position)*speed;}}vartv={/*====variables====*/O:[],screen:{},grid:{size:4,//4x4gridborderSize:6,//borderssizezoomed:false},angle:{x:newLibrary.ease(),y:newLibrary.ease()},came
4、ra:{x:newLibrary.ease(),y:newLibrary.ease(),zoom:newLibrary.ease(),focalLength:750//cameraFocalLength},/*====initscript====*/init:function(){this.screen.obj=document.getElementById('screen');varimg=document.getElementById('bankImages').getElementsByTagName('img');this.screen.obj.onselectstart=fu
5、nction(){returnfalse;}this.screen.obj.ondrag=function(){returnfalse;}/*====createimagesgrid====*/varni=0;varn=(tv.grid.size/2)-.5;for(vary=-n;y<=n;y++){for(varx=-n;x<=n;x++){/*====createHTMLimageelement====*/varo=document.createElement('img');vari=img[(ni++)%img.length];o.className='tvout';o.src
6、=i.src;tv.screen.obj.appendChild(o);/*====3Dcoordinates====*/o.point3D={x:x,y:y,z:newLibrary.ease()};/*====pushobject====*/o.point2D={};o.ratioImage=1;tv.O.push(o);/*====onmouseoverevent====*/o.onmouseover=function(){if(!tv.grid.zoomed){if(tv.o){/*====mouseout====*/tv.o.point3D.z.target=0;tv.o.c
7、lassName='tvout';}/*====mouseover====*/this.className='tvover';this.point3D.z.target=-.5;tv.o=this;}}/*====onclickevent====*/o.onclick=function(){if(!tv.grid.zoomed){/*====zoomin====*/tv.camera.x.target=this.point3D.x;tv.cam
此文档下载收益归作者所有