Javascript animation Grandpa Mao is full of days, javascript is full of days
Var minSize = 50;
Var maxSize = 100;
Var newOn = 200;
Var flakeColor = "# fff ";
Var flak = $ ("<div> </div>" ).css ({"position": "absolute", "top ": "-50px" 00000000.html (" </img> ");
$ (Function (){
Var dheight = $ (document). height (); // get the height of the screen
Var dwidth = $ (document). width (); // obtain the screen width
SetInterval (function (){
Var startPostion = Math. random () * dwidth; // location
Var startOpacity = 0.7 + Math. random () * 0.3; // transparency
Var endPositionTop = dheight; // height
Var endPositionLeft = Math. random () * dwidth; // generates a random number on the left.
Var durationFall = 2000 + Math. random () * 3000; // time
Var sizeFalsk = minSize + Math. random () * maxSize; // size
Flak. clone (). appendTo ("body" ).css ({// copy
"Left": startPostion,
"Opacity": startOpacity,
"FontSize": sizeFalsk,
"BackgroundColor": flakeColor
}). Animate ({// Animation
"Top": endPositionTop,
"Left": endPositionLeft,
"Opacity": 0.5
}, DurationFall, function () {$ (this). remove () ;}); // remove an event
}, NewOn );
});
If necessary, leave your email