CSS

Random Background Untuk Blog kamu

·
<script type="text/javascript">
//Bikin function biar script bisa di panggil dari luar
function gantiWolPep(){
  //Bikin Array buat daftar wallpapers
  var emoWalPep=[
    "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2u0bG_yf1h2Bup34CipQYWxilSCuCs8Oqn5ebcTBq-l73np-34K8QYUSnauWIbiyLCM6IDyViAK4XceSAnTHCZwKHGSDnpKaP-uwxe6WYevHvnHxNWTTPxA1IMZ6Ov_-GqTCUZtmtkGM/s1600/Emo_Wallpapers_78+%28darkwallz.blogspot.com%29.jpg", 
    "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFWbxAQmc5jikd0k8wc8rg6_3RtvRF3bBEypKeQBNh149tcIHhGddudZk5vvv5LkhriWSgF8koMDZBBz4SuRTp0lk2486SZY3AYfLIAFjmyylkaIhT50UgGbh4iRx0rKBEG04I7syPkrg/s1600/Emo_Wallpapers_71+%28darkwallz.blogspot.com%29.jpg", 
    "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtIcxMkB5oF_R6C1cb6ePi_SVS9Gb66FTGFSpM5opmfm3HfbXgcSJJ4GezqBbsmUGhrAVler6qWcxaJWgJACAPnRLy7s4v2OkGyGnfbg_lhKV6-WSa9hOkxXulA7Z9cCHVVbyklIVRvcY/s1600/Emo_Wallpapers_63+%28darkwallz.blogspot.com%29.jpg"
  ];
  //Acak urutan daftar wallpapers pake Math.random()
  emoWalPep=emoWalPep.sort(function() {return 0.5 - Math.random()});
  //Ganti background body dengan warna latar transparent, gambar ngulang ke bawah, gak ikut nge-gulung, vertikal top horizontal tengah
  document.body.style.background='transparent url('+emoWalPep[0]+') repeat-y fixed top center';
  //Ukuran background menuhin lebar ke samping
  document.body.style.backgroundSize='100%';
}
//Langsung ganti wallpaper pas halaman di load
gantiWolPep();
</script>

<!-- Tombol buat ganti wallpaper -->
<center><a onClick="gantiWolPep()" style="cursor:pointer;" class="uiButton">Gentos Kertas Bilik</a></center>


0 komentar:

Posting Komentar

Terima Kasih Atas Komentar Anda..

handapeunpost

content