var minsize=50;
var maxsize=100;
var newon=200;
var flakecolor= "#fff";
var flak=$ ("<div></div>"). css ({"position": "Absolute", "Top": " -50px"}). html ("</img> ");
$ (function () {
var dheight=$ (document). Height ();//Gets the height of the screen
var dwidth=$ (document). width ();//Gets the width of the screen
SetInterval (function () {
var startpostion=math.random () *dwidth;//position
var startopacity=0.7+math.random () *0.3;//Transparency
var endpositiontop=dheight;//height
var endpositionleft=math.random () *dwidth;//generates a left random number
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 Events
},newon);
});
Please leave your e-mail if needed
JavaScript animation Grandpa Hair flying all over the sky