Cara memberi efek salju berjatuhan pada blog, memang widget
untuk blog tiada habis-habisnya selalu ada inofasi baru untuk widget yang pastifresh dan menarik, apa sobat temasuk yang suka menkustomisasi tampilan blogagar lebih menarik? Jika iya, pada artikel kali ini saya akan membagikan sebuah
widget unik dan menarik.
Seperti judulnya widget ini memberikan efek hujan
salju pada blog yang terlihat seperti lagi musim salju gk Cuma efek salju saja yang berjatuhan saya juga
telah menambahkan beberapa efek seperti daun berjatuhan pada blog seperti misum
semi, efek bintang berjatuhan di blog, efek laba-laba berjatuhan di blog,,ngeri
juga ya ada efek laba-laba. semua efek yang ada diatas bisa sobat pilih bebas sesuai keiinginan sobat mau
pakai yang mana tapi yang pasti jangan lupa tinggalkan komentar ya.
- login ke blogger
- pilih tata letak (layout)
- pilih tambah gadget >> html/java script
- copy paste kode dibawah ini
<script type="text/javascript">
//Configure below to change URL path to the snow image
var snowsrc="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQpyC3_kL0unf6nceisRp-DAEyht_FBebT_WmST6o_btHsxRG_mQLn4rDF_0CLXAVb9zieBjp4mzlvqmuy5ItjouoGfCRDAM2BBfDP0JpkTCwCH7RBzcnTHztEOJU09F5dlOJxkoo_Ijk/s400/snow.gif"
// Configure below to change number of snow to render
var no = 15;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";
///////////Stop Config//////////////////////////////////
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQpyC3_kL0unf6nceisRp-DAEyht_FBebT_WmST6o_btHsxRG_mQLn4rDF_0CLXAVb9zieBjp4mzlvqmuy5ItjouoGfCRDAM2BBfDP0JpkTCwCH7RBzcnTHztEOJU09F5dlOJxkoo_Ijk/s400/snow.gif" : snowsrc
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
}
function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}
function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}
if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}
</script>
NOTE:
ganti tulisan berwarna biru dengan url gambar yang sobat inginkan dibawah ini
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG0ofv9jSVEohRmtYO7r0UQSW7O7G1DEvapeczlWJ4ss1DUzlrGliK1KMfBT62tX1h_r_H_PzqX6lyWDBa84qeReIxmZi4QMA4T5ALd9m_7t2EpiH0GGF2dAoD1jx3NuwjSBlAhVqVIwaa/s1600/laef-3.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9_w5eb-tKtp7Od7difD1aOC4Pqe2G-G9qEMjTksXJ0N_W_zTNgSU5dv_x4gT_LaJ84RCirOgMwsetHF2B3YIb1j_N_lmTSDitdSojKNpGSPDe_epfZrCbtTN-LZ27QjRaNVF_KKLGcXRb/s1600/leaf-1.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh61lZdeOLuLQD9aMal8Nmyo-EdfYiwSfJb7gjUM6RsdOJXLEDnMv8ARIX7OQxBiduQ2L74MI5XVFmQg30XGYRjWz6W3qPj7BhKjCU95u4voSV898cU9c6rcl4FcTR8vC1FDlKRmcCUQUUH/s1600/leaf-2.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrlxICD6CXW_StUstAJqRHQFt9w4d1cAjNIhRGL4U2pUff_nUcPc9M6PS0nR8v0_wARIB813Sw8xKvx79QAnNu8NX6hg0UfD5TtfIzcx9cDnGIi-_25J_zxQ6x26kV58wZhyphenhyphen4-VUuBQvHd/s1600/music.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCNvpcDCby8GIUFfSUF5nd3Rz08G_g7nYnSnCaSAzUfTGZcvFnNOsBcxInUR5y2CJzdoZ6riI4BPmxAphes-LeBNzR_eO2omYUByDRpLfkZMmPj_m7BoNF6au7KR3YzHZM_837RCTjOI7U/s1600/spider.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkG3uGnhNaFyz341AyNTSqeWqvJoPCCrXfUYtaf9_hKgTqZC3gxCK3Dkt646HzZYCAiSnQvl0hvfNoOa9yaQIeEr1HQPlMN33q05Ci2VaCApgser6QPM4Hc_L5pPDdbpuTfZWbP9lrqXq2/s1600/star.png
Makisah ya gan..
ReplyDeleteSudah saya terapkan diblog..
makasih ya gan , sangat bermanfaat bagi newbie kaya gue :#
ReplyDeletewiiihh tambah cakep aja blog saya,, thanks gan ^_*
ReplyDeleteDulu saya menggunakan tapi setelah ada pengunjung yang mengeluhkan loadingnya jadi lama mau ga mau saya menghapusnya mas.
ReplyDeleteTapi ya lebih bagus ga dipasang sih demi kenyamanan pengunjung