>您现在的位置:文学月刊 > 西方诗歌

超流畅漂亮的图片3D旋转滚动JS特效代码 - 滚动代码 - js代码

2019-05-15 14:24作者:admin

超流畅漂亮的图片3D旋转滚动JS特效代码发布时间:2015-12-2520:13:42您是第位浏览者本js特效代码兼容:ie6、ie7、ie8、ie9、ie10、ie11、chrome、firefox、opera、safari、等浏览器varEffect=function(a,w,h,s,p,x,y){var_3Deffect=function(array,width,height,stage,per,x,y){=document;=stage;=width;=height;=array;=dtid=\shadow\/=per,=x,=y,=0,=0}_={transform:function(elem,value,key){key=key||transform[-webkit-,-moz-,-ms-,-o-,].forEach(function(pre){[pre+key]=value});returnelem},piece:function(value,key){varstr=key=key||transform[-webkit-,-moz-,-ms-,-o-,].forEach(function(pre){str+=(key+:+pre+value);returnfalse});returnstr},addEvent:function(obj,sEvent,fn){if(){(on+sEvent,fn)}else{(sEvent,fn,false)}},onMouseWheel:function(e){var_o=this;if(:){if(_){_+=150}}else{if(_){_=150}};_(_[0],perspective(+_+px)rotateX(+_+deg)rotateY(+_+deg));if(){()};returnfalse},startMove:functionstartMove(obj){var_o=this;=||null;clearInterval();=setInterval(function(){_=_;_+=_;_*=;_*=;if((_)(_)){_()};_(obj,perspective(+_+px)rotateX(+_+deg)rotateY(+_+deg))},30)},stopMove:function(t){clearInterval(t)},init:function(){var_o=this;(_,function(i){varshadow=_(linear-gradient(top,rgb(0,0,0)50%,rgba(255,255,255,0)),url(+this+);,background-image),shadow=divclass=\over\style=\+shadow+\/div_+=ddstyle=\background-image:url(+this+);\+shadow+/dd});Aui(_).html(_);var_oList=Aui(dd,_),_sLen=_,_deg=360/_sLen,_tranZ=(_/2+40)/((360/_sLen/2)*/180),_i=_sLen;while(_i0){(function(d,len,_oList,_o){setTimeout(function(){varidx=len-d,oThis=_oList[idx][0].=;_(oThis,rotateY(+(idx*_deg)+deg)translateZ(+_tranZ+px))},d*200)})(_i--,_sLen,_oList,_o)};varwheel=function(e){_(_o,e||)};_(_,mousewheel,wheel);_(_,DOMMouseScroll,wheel);varAuiDoc=Aui(_);(function(e){varmoveX=,moveY=;varstartX=_;varstartY=_;varlastX=moveX;varlastY=moveY;_=_=0;(function(e){varx=,y=;_=startY+()/10;_=startX-()/10;_(_[0],perspective(+_+px)rotateX(+_+deg)rotateY(+_+deg));_=()/5;_=()/5;lastX=;lastY=});(function(){=null;=null;_(_[0])});_(_[0].timer);returnfalse});return_o}};returnnew_3Deffect(a,w,h,s,p,x,y)};(function(){if(/ie/(())){Aui(body).html(,支持非IE浏览器。 你懂的!).setStyle({color:#fff,text-align:center,font-size:50px,font-weight:bolder,line-height:500px})}else{Effect([,,,,,,,,],200,300,(#stage),2000,-10,0).init()}});。

随机推荐

图文聚集

热门排行

最新文章