Salsa's Tutobies Blog // Vacuum

Saturday, 21 September 2013 - 0 People[s]

Berbeda dengan efek salju yang lawas, kali ini saljunya berbentuk kotak kecil. Klik disini untuk live preview :) Kodenya dapet dari mana aku lupa -_- hehe.
Denim/Simple Template :
  • Paste kan kode di HTML/JavaScript.
  • Jangan lupa ganti kode yang bold berwarna merah.
Blogskin/Classic Template :
  • Paste kan kode tepat di atas kode <style type="text/css">.
  • Jangan lupa ganti kode yang bold berwarna merah.
The code :
<script type="text/javascript"> // <![CDATA[ var speed=33; // lower number for faster var flakes=100; // number of flakes var colour="#96c"; // colour of flakes var slush=20; // set to '0' for no slush or otherwise set to height at which slush melts var over_or_under="over"; // set to "over" for snow to always be on top, or "under" to allow it to float behind other objects /***************************\ * Let It Snow Effect * *(c)2004-13 mf2fm web-design* * * * DON'T EDIT BELOW THIS BOX * \***************************/ var flks=new Array(); var flkx=new Array(); var flky=new Array(); var fldy=new Array(); var slss=new Array(); var slsh=new Array(); var swide, shigh, boddie; function addLoadEvent(funky) { var oldonload=window.onload; if (typeof(oldonload)!='function') window.onload=funky; else window.onload=function() { if (oldonload) oldonload(); funky(); } } addLoadEvent(baby_its_cold_outside); function baby_its_cold_outside() { if (document.getElementById) { var i; boddie=document.createElement("div");; i.position="fixed";"0px"; i.left="0px"; i.overflow="visible"; i.width="1px"; i.height="1px"; i.backgroundColor="transparent"; document.body.appendChild(boddie); set_width(); for (var i=0; i<flakes; i++) { flks[i]=createDiv(3, 3, colour); flkx[i]=3*Math.floor(Math.random()*swide/3); flky[i]=Math.floor(Math.random()*shigh); fldy[i]=2+Math.floor(Math.random()*4); flks[i].style.left=flkx[i]+"px"; flks[i][i]+"px"; flks[i].style.zIndex=(over_or_under=="over")?"1001":"0"; boddie.appendChild(flks[i]); } setInterval("let_it_snow()", speed); }} function createDiv(height, width, colour) { var div=document.createElement("div");"absolute";"px";"px";"hidden";; return (div); } window.onresize=set_width; function set_width() { var sw_min=999999; var sh_min=999999; if (document.documentElement && document.documentElement.clientWidth) { if (document.documentElement.clientWidth>0) sw_min=document.documentElement.clientWidth; if (document.documentElement.clientHeight>0) sh_min=document.documentElement.clientHeight; } if (typeof(self.innerWidth)=='number' && self.innerWidth) { if (self.innerWidth>0 && self.innerWidth<sw_min) sw_min=self.innerWidth; if (self.innerHeight>0 && self.innerHeight<sh_min) sh_min=self.innerHeight; } if (document.body.clientWidth) { if (document.body.clientWidth>0 && document.body.clientWidth<sw_min) sw_min=document.body.clientWidth; if (document.body.clientHeight>0 && document.body.clientHeight<sh_min) sh_min=document.body.clientHeight; } if (sw_min==999999 || sh_min==999999) { sw_min=800; sh_min=600; } swide=sw_min-3; shigh=sh_min; if (slush) { if (swide/3>slss.length) for (i=slss.length; i<swide/3; i++) { if (!slsh[i]) slsh[i]=3; slss[i]=createDiv(slsh[i], 3, colour); boddie.appendChild(slss[i]); } for (i=0; i<swide/3; i++) { slss[i].style.height=slsh[i]+"px"; slss[i][i]+"px"; slss[i].style.left=3*i+"px"; } if (i<slss.length && slss[i].style.left!="-3px") for (; i<slss.length; i++) slss[i].style.left="-3px"; } } function let_it_snow(c) { var i, x, o=0, z=0; for (i=0; i<flakes; i++) { flky[i]+=fldy[i]; x=Math.floor(flkx[i]/3); if (slush) { o+=slsh[x]; if (flky[i]>=shigh-slsh[x]) { if (x<swide && slsh[x]>slsh[x+1]+3) x++; else if (x>0 && slsh[x]>slsh[x-1]+3) x--; slss[x][x]+=3)+"px"; slss[x].style.height=slsh[x]+"px"; flky[i]=shigh; } } if (flky[i]>=shigh || flkx[i]>swide) { flky[i]=0; fldy[i]=2+Math.floor(Math.random()*4); flkx[i]=3*Math.floor(Math.random()*swide/3); flks[i].style.left=flkx[i]+"px"; z++; } flks[i][i]+"px"; } if (o>flakes*slush) for (i=0; i<slsh.length; i++) if (slsh[i]>3) slsh[i]--; if (z || o>flakes*slush) set_width(); } // ]]> </script>

Post a Comment

for your info

[Ordinary girl with extraorninary idea]
Hello ! My name is Anugerah Mullia Ulfa Salsabella. You can call me Salsa. Born at 2000 line. Live in Bekasi, West Java. Proud to be part of swiftie and directioner.

Do follow me

hide and seek
Secret box

1 2 3 4
This is Navigate around. Please read this :
1 = box
2 = My sites
3 = Blog stats
4= Search box

shout what ever

I'm sorry, but the chatbox is not available now because I'm in HIATUS mode. You can contact me on facebook or twitter^-^

related post

Big claps for them

© 2013 - Full Template by Salsa. Somebody help me is Gh R A Y. I took many part of this blog by many skins, so big thanks to, espesially to Uhbmy and there's no basecode. Best viewed is in Google Chrome (Recommended). Don't ever dare to open my page source and copy any content from this site!