日本語
<!-- website:http://www.downcodes.com --> <!-- bbs:http://bbs.downcodes.com --> <!-- 完全な HTML コードは次のとおりです --> <html > <head> <title>Web ページでの実際の宇宙効果のデモンストレーション [Web ページの特殊効果]s</title> <meta name="Author" content="http://www.downcodes.com"> <メタ http-equiv ="imagetoolbar" content="no"> <style type="text/css"> body {cursor:crosshair;padding:0; 位置:absolute:hidden; ; 左:0; 幅:100%; 高さ:100%;} img {位置:絶対;左:0;幅:100 %;高さ: 10%;背景:#333;z-index:1;} .borderBottom {位置:絶対;左:0;上:90%;幅:100%;高さ:10%;背景:#333; z-index: 1;} </style> <script type="text/javascript"><!-- // ======================= ==== ================================ // http://www.downcodes.com // = ==== ============================================= ==== ==== window.onerror = new Function("return true") G1D = new Object(); o = xm = ym = M = sx = sy = sz = 0; r(v, x){ if (v>x) v-=x; else if (v<0) v+=x; return v } document.onmousemove = function(e){ if (window.event) window.event; xm = (ex || e.clientX); ym = (ey || e.clientY); } 関数のサイズ変更 (nx = document.body.offsetWidth;オフセット高さ; } onresize = サイズ変更; G1D.creaTe = function(img,w,h,Z){ this.O.src = img.src; .O); this.Z = Z; this.h = h; this.y2D = 0; ; this.y3D = Math.round(Math.random() * 100); this.z3D = Math.round(Math.random() * 100) } G1D.creaTe.prototype.aNim = function(sx,sy, sz) { with (this){ with(O.style){ wp = 8+(w * (100 - z3D)) * Z; hp = 8+(h * (100 - z3D)) * lp = x2D; - (wp * .5); tp = y2D - (hp * .5); if(lp>-wp && lp<nx && tp>-hp && tp<ny){ 幅 = wp; lp; トップ = zIndex = Math.round(-z3D + wp); } x3D=r(x3D += sx,100); z3D=r( z3D += sz,100); x2D=(nx * .5) + (((x3D - 50) * nx) / z3D); ) * ny) / z3D); } } G1D.obZ = function(N,img,Z) { this.N = N; this.k = 0; h = img.高さ; for(i=0;i<N;i++) this.o[i] = new G1D.creaTe(img,w,h,Z); } G1D.obZ.prototype.ouiiiin = function( ){ this.k += .1; sz = Math.sin(this.k * .1); sx = ((nx * .5) - xm) / (nx * .25) ; sy = ( (ny * .5) - ym) / (ny * .25); } else { sx += Math.cos(this.k / 4) * sy += Math.sin(this. k / 8) * .01; } for(i=0;i<this.N;i++)this.o[i].aNim(sx,sy,sz); } 関数 mainloop(){ M--; .ouiiiin() ; setTimeout("mainloop();",16); } onload = function (){ SF = document.getElementById("starfield"); ; o = new G1D.obZ(100,document.getElementById("planet"),.015); } //--> </script> </head> <body> <div class="borderTop" "></ div> <div class="borderBottom"></div> <div id="starfield" style="position:absolute;left:0;top:0;z-index:2;"></ div> <img id=planet src=""> </body> </html>