Ads 468x60px

Minggu, 16 Desember 2012

Cara Membuat Background Blog Gonti-Ganti

Loggin ke blogger anda, terus pilih template, edit html, centang expand Template Widget, Copas Script Berikut Diatas </Body>
<script type='text/javascript'>
var bg = [
&quot;URL Background 1&quot;,
&quot;URL Background 2&quot;,
&quot;URL Background 3&quot;,
&quot;URL Background 4&quot;,
&quot;URL Background 5&quot;,
&quot;URL Background 6&quot;
];
function gantiBg(){
  var bgLeng = bg.length-1;
  var i = Math.floor(Math.random()*bgLeng);
  document.body.style.backgroundImage=&#39;url(&#39;+bg[i]+&#39;)&#39;;
  setTimeout(&quot;gantiBg()&quot;,7500);
}
gantiBg();
</script>

Keterangan: 
Yang berwarna merah diganti dengan URL gambar sobat yang mau dijadikan background blog.
Yang Berwarna Biru adalah waktu ganti background, ganti sesuai keinginan sobat blogger, contohnya punya saya 7500 berarti backgroun berganti setiap 7,5 detik.

Sebelum diedit:


Setelah diedit:


Contoh background:
<script type='text/javascript'>
var bg = [
&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBljYBcLeWNKXy-9Jb7dpue0Wf7rzBQnOKm6AHIMzu7AcLA0Oq3Ns_EOHCdhCwFG4PCwQLVDueycFgJr3W4PFs7m9pGGs38JNNx1TytCHUyzHYhihYsIQn46YO-JGY-MxAFKEu_LGdjUIQ/s400/IMG00865-20121117-0749.jpg 1&quot;,
&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjICf3r_3O9kkoIxIGsZHNXK5e9jzay2FokwHo7O8PDB3xLENcDQTqnQsg3bcri2VAK-zLNlmbbxQ_cIkvNAuBoRIZDb3AtAUwiVfeUDc8_204xgp4J_FUh1kT3n9qHRVgizkFRLM3yRrFe/s400/IMG00888-20121117-0756.jpg&quot;,
&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdC0v16OGY04wgEbgFbk2xtWWzF8-igisG7H9jbUrUZh3yP1QatE8ip6a8vW4qUcd1yHsRq_goY13yK8V0JSHNvC5OgnzhWkHSsqDi5xDUtciynnMldcVEtpVyyyQEe87_RIA5pw4_RMgm/s400/IMG00890-20121117-0757.jpg&quot;,
&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyU8YesLdHLiEN7pHCUXc2hYBqSRX7gVWJNB5fwOTibKMzv4rPCTdjqwUkUJZqbjPsET2xHr7knMQZoHU_IXyQtbJaswD8SvTI7a0-P1D2LERpd1UtPW8ebxNYFaLcE9Bwf_kosj1nKa5s/s240/527887_459855517370491_2093330891_n.jpg&quot;,
&quot;http://badge.facebook.com/badge/100000381395319.894.208675063.png&quot;,
&quot;http://i.mnpls.com/6/630.gif&quot;
];

function gantiBg(){
  var bgLeng = bg.length-1;
  var i = Math.floor(Math.random()*bgLeng);
  document.body.style.backgroundImage=&#39;url(&#39;+bg[i]+&#39;)&#39;;

  setTimeout(&quot;gantiBg()&quot;,7500);
}

gantiBg();
</script>

0 komentar:

Posting Komentar