JS图片特效代码-超牛X
作者:我就是个世界
发表于:2008-01-17
[color=#FF0000]以下4个代码框中是四种JS的图片特效,把代码复制粘贴到浏览器地址栏中运行,即可看到效果[/color]
[code]javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);[/code]
[separator]
[code]javascript:i=y=0;z=v=10;m=document.all;l=m.length;for(;i<l;i++){ if(m(i).tagName=='A'){m(i).style.display='none'}}function g(){j=m(y);if(j.tagName=='A'){p=j.style;p.display='inline';p.position='absolute'; p.filter='progid:dXImageTransform.Microsoft.Matrix(sizingMethod=\'auto expand\')';n=j.filters.item(0);w=z*1.5;r=.05*((y%2)?z:-z);c=Math.cos(r);s=Math.sin(r);if(w<1){s=0;w=1;p.position='static';y++;z=v}n.M11=c*w; n.M12=-s*w;n.M21=s*w;n.M22=c*w;z--;}else{y++; z=v}}setInterval('g()',5);void(0)[/code]
[code]javascript:R=0; x1=.2; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',50); void(0);[/code]
[code]javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0); [/code]
[code]javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);[/code]
[separator]
[code]javascript:i=y=0;z=v=10;m=document.all;l=m.length;for(;i<l;i++){ if(m(i).tagName=='A'){m(i).style.display='none'}}function g(){j=m(y);if(j.tagName=='A'){p=j.style;p.display='inline';p.position='absolute'; p.filter='progid:dXImageTransform.Microsoft.Matrix(sizingMethod=\'auto expand\')';n=j.filters.item(0);w=z*1.5;r=.05*((y%2)?z:-z);c=Math.cos(r);s=Math.sin(r);if(w<1){s=0;w=1;p.position='static';y++;z=v}n.M11=c*w; n.M12=-s*w;n.M21=s*w;n.M22=c*w;z--;}else{y++; z=v}}setInterval('g()',5);void(0)[/code]
[code]javascript:R=0; x1=.2; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',50); void(0);[/code]
[code]javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0); [/code]
请发表您的评论