Tip: You can modify some of the code before running
<ptml> <pead> <title> stars fly out of the background </title> <style type= "Text/css" > <!--body {font-family : "The song Body"; font-size:9pt; margin-top:0px; margin-left:4px; margin-right:0px} A {color:black; font-size:13px; font-weight:400; Text-decoration:none} a:hover {color:red; font-size:13px; font-weight:400; Text-decoration:underline} a:active {font:9pt "song body"; Cursor:hand color: #FF0033}--></style> <meta H ttp-equiv= "Content-type" content= "text/html; charset=gb2312 "> <style type=" Text/css ">. Star {position:absolute; layer-background-color:white; visibility : visible; top:-50px; width:50px; height:50px; font-size:1px; Background-color:white; } </style> <script language= "JavaScript" > <!--Begin var starnum = 75; Number of stars var IsNS = (document.layers); var _all = (IsNS)? ': ' All. ' var _style = (IsNS)? ': '. Style '; var xoffset, Yoffset, w_x, w_y, tmpx, Tmpy, SCRLX, scrly; function Getstartpos (obj) {Obj.deltay = Math.floor (Math.random () * 12); Obj.deltax = Math.floor (Math.random () * 12); Obj.xdir = (Math.floor (Math.random () * 2) = = 1)? '+' : '-'; Obj.ydir = (Math.floor (Math.random () * 2) = = 1)? '+' : '-'; Obj.counter = 1; if (IsNS) {obj.clip.width = 1; obj.clip.height = 1; Obj.moveto (Xoffset+pagexoffset, yoffset+pageyoffset);} else {Obj.wi DTH = 1; Obj.height = 1; Obj.pixeltop = Yoffset+document.body.scrolltop; Obj.pixelleft = Xoffset+document.body.scrollleft; } function MoveStar (starn) {tmpx = Starn.deltax*starn.counter+starn.counter; tmpy = starn.deltay*starn.counter+ Starn.counter; if (IsNS) {starN.clip.width = STARN.COUNTER/3; starN.clip.height = STARN.COUNTER/3; scrlx = pagexoffset; scrly = page Yoffset; if ((starn.left+tmpx >= w_x+scrlx) | | (starn.top+tmpy >= w_y+scrly) | | (starn.left-tmpx <= scrlx) | | (Starn.top-tmpy <= scrly)) {Getstartpos (Starn);} else {eval (' Starn.moveby (' +starn.xdir+tmpx+ ', ' +starn.ydir+tmpy+ ') '); } else {starn.width = starn.coUNTER/3; Starn.height = STARN.COUNTER/3; SCRLX = Document.body.scrollLeft; scrly = Document.body.scrollTop; if ((starn.pixelleft+tmpx >= w_x+scrlx) | | (starn.pixeltop+tmpy >= w_y+scrly) | | (starn.pixelleft-tmpx <= scrlx) | | (Starn.pixeltop-tmpy <= scrly)) {Getstartpos (Starn);} else {eval (' starn.pixeltop ' +starn.ydir+ ' =tmpy '); eval (' Starn.pixelleft ' +starn.xdir+ ' =tmpx '); }} starn.counter++; function animate () {for (I=1 i <= starnum; i++) {MoveStar (eval (' star ' +i);} settimeout (' Animate () ');} functi On Findwindowparams () {w_x = (iSNS)? window.innerWidth:document.body.clientWidth; w_y = (iSNS)? Window.innerheight: Document.body.clientHeight; Xoffset = W_X/2; Yoffset = W_Y/2; for (i = 1; I <= starnum i++) {Getstartpos (eval (' star ' +i)); } function Resizens () {settimeout (' document.location.reload () ', 400);} (IsNS)? Window.onresize = ResizeNS:window.onresize = Findwindowparams; Window.onload = new Function ("Findwindowparams ()"; Animate (); "); // End--> </script> </pead> <body bgcolor=black> <br> <br> <center><font color= Red face= "Official script" size=6> stars fly out of the background </font></center> <br> <script language= "JavaScript" > <!-- Begin for (i = 1; I <= starnum i++) {Document.writeln (' <div id= ' star ' +i+ ' "class=" star ' ></div> '); eval (' V Ar star ' +i+ ' =document. ' +_all+ ' star ' +i+_style); }//End--> </script> <br> <br> <br> <br> <br> <br> <br> <br> &L t;br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> &L t;br> <br> <br> <br> <br> <center> <script language= "JavaScript" > <!--Hide Fu Nction Gohist (a) {history.go (a);}//--> </script> </center> <br> <center> <br> <br> </body> </ptml>
Tip: You can modify some of the code before running