<HTML> <HEAD> <Title> Generate bubbles around the mouse on the webpage </title> </HEAD> <BODY bgColor = #000000 scroll = no onload = zyva ()> <Div id = aqua style = "position: absolute; left = 0; top = 0;"> </div> <SCRIPT> Object = new Array () Var xm, ym Function CObj (N, obj ){ Aqua. insertAdjacentHTML ("AfterBegin", " ") This. img = aqua. firstChild. style Mr = Math. random () This. v = 6 * mr + 4 This. s =. 5 * mr This. p =. 1 + mr This. w = 0 This. k = 0 This. x = xm This. y = N This. ChteuMeulEu = function ChteuMeulEu (){ With (this ){ With (img ){ Left = (x + = 0.5 * v * Math. sin (k + = s)-w * 0.5 Top = y-= v Width = Math. min (w + = p, 100) } If (y <-w ){ W = 8 Y = ym X = xm } } } } Function gradient (R, G, B, m ){ For (I = 0; I <25; I ++ ){ C = 255-10 * I C = "\" RGB ("+ Math. round (c * R/255) + "," + Math. round (c * G/255) + "," + Math. round (c * B/255) + ")\"" Code = "<span style = 'position: absolute; font-size: 1pt; left = 0; width = 120%; height =" + (m) + ". 2%; top = "+ (I * m) + "%; Background =" + C + "; z-Index:-1000 '> </span>" Document. body. insertAdjacentHTML ("beforeEnd", code) } } Function zyva (){ Xm = document. body. offsetWidth * 0.5 Ym = document. body. offsetHeight Document. onmousemove = function (){ Xm = window. event. clientX Ym = window. event. clientY } For (I = 0; I <60; I ++) object [I] = new CObj (I, B) SetInterval ("for (I in object) object [I]. ChteuMeulEu ()", 16) Gradient (41,93, 214,2) } </SCRIPT> </BODY> </HTML> |