For falling snow on Christmas a widget for your blogger and website i give you.A java script code below ,Copy that code in your blogger and website . For making snow fall you need a javascript and css . both of these are here:
Place these code in your website in head section.
<style type="text/css"> .snow { position:absolute; layer-background-color:lightblue; visibility:visible; top:-50px; font-size:1px; background-color:lightblue; } </style>
Place this code any where in body of the blog.
<script language="javascript"> var snowflakes=50; //NUMBER OF OBJECTS YOU WANT. var level=2; //SPEED LEVEL 1 to 5. 1=SLOWER, 5=FASTER var w3c=(document.getElementById)?true:false; var ns4=(document.layers)?true:false; var ie4=(document.all && !w3c)?true:false; var ie5=(document.all && w3c)?true:false; var ns6=(w3c && navigator.appName.indexOf("Netscape")>=0)?true:false; var t=''; var w_x, w_y; var snow=new Array(); for(i=1;i<=snowflakes;i++)t+='<div id="snow'+i+'" class="snow"></div>'; document.write(t); function getstartpos(obj){ obj.size=Math.floor(Math.random()*5)+1 obj.ystep=obj.size*level; obj.xstep=obj.ystep/5; if(ns4)obj.clip.width=obj.clip.height=obj.size; else obj.style.width=obj.style.height=obj.size; moveidto(obj,Math.floor(Math.random()*w_x)-obj.size,0); } function movedrop(){ for(i=1;i<=snowflakes;i++){ var l=(ns4)?snow[i].left:parseInt(snow[i].style.left); var t=(ns4)?snow[i].top:parseInt(snow[i].style.top); var pxo=(ie4||ie5)?document.body.scrollLeft:pageXOffset; var pyo=(ie4||ie5)?document.body.scrollTop:pageYOffset; if( (t+snow[i].ystep+snow[i].size>=w_y+pyo) || (snow[i].xpos-snow[i].size<pxo)) getstartpos(snow[i]); else moveidto(snow[i], l-snow[i].xstep, t+snow[i].ystep); }} function getwindowdims(){ w_x=(ie4||ie5)? document.body.clientWidth:window.innerWidth; w_y=(ie4||ie5)? document.body.clientHeight:window.innerHeight; } function moveidto(id,x,y){ if(ns4)id.moveTo(x,y); else{ id.style.left=x+'px'; id.style.top=y+'px'; }} window.onresize=function(){ if(ns4)setTimeout('history.go(0)',400); else getwindowdims(); } window.onload=function(){ level=Math.max(Math.min(5,level),1) getwindowdims(); for(i=1;i<=snowflakes;i++){ snow[i]=(ns4)?document.layers['snow'+i]:(ie4)?document.all['snow'+i]:document.getElementById('snow'+i); getstartpos(snow[i]); moveidto(snow[i],Math.floor(Math.random()*(w_x-10)),Math.floor(Math.random()*(w_y-10))); } setInterval('movedrop()',50); } </script>
After all you get snall fall effect on your website.and snow start falling on every page . I suggest you to put code in sidebar of the website by which you can get effect on every page other wise your code active on that page where you put this link.
Note: This code is regenerated here not develop here so we are not responsible for any kind of copyright issue.
Leave a Reply