*2015/11/30
*@MT制作-雪花飘落的组件
*/
$(document).ready(function(e) {
$("<div></div>").addClass("snowDome").appendTo($(document.body));
$('.snowDome').css({
"background":"#000",
"position":"fixed",
"top":"0px",
"left":"0px",
"z-index":"-1",
"width":$(window).width()-0,
"height":$(window).height()-0
});
// 定时制作雪花
setInterval(function(){
$("<div>❄</div>").css({
"color":"#fff",
"position":"absolute",
"top":"-100px",
"font-size":Math.random()*30+14,
"left":Math.random()*($(window).width()-0),
"opacity":"1"
}).appendTo(".snowDome").animate({
"top":$(window).height()-0,
"left":Math.random()*($(window).width()-0),
"opacity":"0.2"
},Math.random()+10000,function(){
$(this).remove();
});
},90);
});