Trang trí Valentine's Day cho Blogger

Hôm này mình chia sẻ code Trang trí Ngày Lễ Tình Nhân - Valentine's Day cho blogger với Javascript.
DEMO
Chèn code này trước thẻ đóng </head>
<style type='text/css'>
body {background: #ff449d url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTTx4dORjmWOFXPEgHsD8eiVtZERf7wwtD4xHv9r9aiO1E-nDIvk8B3qMHeb4Ix6vrQsbHO6Hp3F_WSSkojptQwMOnlvFz-dDI_HYXVBOCPNiu8W7E0TqJrbAxEabjJl_w6-aeXErJnSLu/s0/738322z0khilo37b.gif) repeat scroll top left;
}
</style>
<script type='text/javascript'>//<![CDATA[
var fallObjects=new Array();function newObject(url,height,width){fallObjects[fallObjects.length]=new Array(url,height,width);}
///////////// Thông số //////////////
var numObjs=20, waft=50, fallSpeed=10, wind=0;
newObject("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOLed4ur18unKR4u9su0EqjTIGrfDOQumpvGpgA-nB3fje06PuseTSh7q34qy51YqUx4AuF0RB8NNUzvdAcUgD9rHINp_Te6DmF58ySsP61iDBxweUwSf8BRvi2oa50089c1Su2xeP8S8C/s1600/heart9.gif",16,15);
newObject("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOLed4ur18unKR4u9su0EqjTIGrfDOQumpvGpgA-nB3fje06PuseTSh7q34qy51YqUx4AuF0RB8NNUzvdAcUgD9rHINp_Te6DmF58ySsP61iDBxweUwSf8BRvi2oa50089c1Su2xeP8S8C/s1600/heart9.gif",16,15);
//////////////////////////////////////////////
function winSize(){winWidth=(moz)?window.innerWidth-180:document.body.clientWidth-180;winHeight=(moz)?window.innerHeight+500:document.body.clientHeight+500;}
function winOfy(){winOffset=(moz)?window.pageYOffset:document.body.scrollTop;}
function fallObject(num,vari,nu){
objects[num]=new Array(parseInt(Math.random()*(winWidth-waft)),-30,(parseInt(Math.random()*waft))*((Math.random()>0.5)?1:-1),0.02+Math.random()/20,0,1+parseInt(Math.random()*fallSpeed),vari,fallObjects[vari][1],fallObjects[vari][2]);
if(nu==1){document.write('<img id="fO'+i+'" style="position:fixed;" src="'+fallObjects[vari][0]+'">'); }
}
function fall(){
for(i=0;i<numObjs;i++){
var fallingObject=document.getElementById('fO'+i);
if((objects[i][1]>(winHeight-(objects[i][5]+objects[i][7])))||(objects[i][0]>(winWidth-(objects[i][2]+objects[i][8])))){fallObject(i,objects[i][6],0);}
objects[i][0]+=wind;objects[i][1]+=objects[i][5];objects[i][4]+=objects[i][3];
with(fallingObject.style){ top=objects[i][1]+winOffset+'px';left=objects[i][0]+(objects[i][2]*Math.cos(objects[i][4]))+'px';}
}
setTimeout("fall()",31);
}
var objects=new Array(),winOffset=0,winHeight,winWidth,togvis,moz=(document.getElementById&&!document.all)?1:0;winSize();
for (i=0;i<numObjs;i++){fallObject(i,parseInt(Math.random()*fallObjects.length),1);}
fall();
//]]></script>
Lưu lại và thưởng thức.