Begini Cara Membuat Iklan Tampil Melayang Dengan Tombol Close Di Blog / Website

Objek melayang atau sering juga di sebut dengan Float Top Bar, sebuah jendela kecil yang muncul dari atas halaman setiap kali kita mengunjungi Website atau Blog. Float Top Bar ini biasanya berisi Content Iklan ataupun sebuah Form SubScribe sehingga pasti terlihat oleh pengunjung Website atau Blog kita. Untuk membuat Iklan melayang seperti ini sangatlah mudah, hanya dengan beberapa langkah, maka Iklan Melayang tersebut sudah bisa terpasang pada Website atau Blog Anda.

Oke, berikut ini adalah langkah-langkah membuat iklan melayang dengan tombol close :

  • Login Ke Blogger.com dengan Akun anda masing-masing Pastinya
  • Masuk ke Tab Tata Letak
  • Pilih Elemen Halaman
  • Tambah Gadget Pilih HTML / JAVASCRIPT
  • Dan copy kode di bawah ini kedalamnya yah

<blockquote>
<div style="color: #cccccc;">
&lt;a onblur="try {parent.</div>
<div style="color: #cccccc; text-align: left;">
deselectBloggerImageGracefully();} catch(e) {}"  href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimgefY9R_-tQ-I1zctzUSWIM1ktHiXBl2XUG82ERGJrbvUm3cgT_CtDsuKuOyYY-BUq-cj5avgYoQ7LZqbT9XEPyskzo1BHqYT-icGUG-95wY1VjOk7XQWkp1dtGj5ti2JJN3tgQPnH84/s1600-h/Widget.JPG"&gt;&lt;img     style="margin: 0px auto 10px; display: block; text-align: center;  cursor:    pointer; width: 400px; height: 300px;"  src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimgefY9R_-tQ-I1zctzUSWIM1ktHiXBl2XUG82ERGJrbvUm3cgT_CtDsuKuOyYY-BUq-cj5avgYoQ7LZqbT9XEPyskzo1BHqYT-icGUG-95wY1VjOk7XQWkp1dtGj5ti2JJN3tgQPnH84/s400/Widget.JPG"     alt="" id="BLOGGER_PHOTO_ID_5433478876639914642" border="0"  /&gt;&lt;/a&gt;</div>
<div style="color: #cccccc;">


</div>
<div style="color: #cccccc;">
&lt;style type="text/css"&gt;</div>
<div style="color: #cccccc;">
#gb{</div>
<div style="color: #cccccc;">
position:fixed;</div>
<div style="color: #cccccc;">
top:10px;</div>
<div style="color: #cccccc;">
z-index:+1000;</div>
<div style="color: #cccccc;">
}</div>
<div style="color: #cccccc;">
* html #gb{position:relative;}</div>
<div style="color: #cccccc;">
</div>
<div style="color: #cccccc;">
.gbcontent{</div>
<div style="color: #cccccc;">
float:right;</div>
<div style="color: #cccccc;">
border:2px solid #A5BD51;</div>
<div style="color: #cccccc;">
background:#ffffff;</div>
<div style="color: #cccccc;">
padding:10px;</div>
<div style="color: #cccccc;">
}</div>
<div style="color: #cccccc;">
&lt;/style&gt;</div>
<div style="color: #cccccc;">
</div>
<div style="color: #cccccc;">
&lt;script type="text/javascript"&gt;</div>
<div style="color: #cccccc;">
function showHideGB(){</div>
<div style="color: #cccccc;">
var gb = document.getElementById("gb");</div>
<div style="color: #cccccc;">
var w = gb.offsetWidth;</div>
<div style="color: #cccccc;">
gb.opened ? moveGB(0, 30-w) : moveGB(20-w, 0);</div>
<div style="color: #cccccc;">
gb.opened = !gb.opened;</div>
<div style="color: #cccccc;">
}</div>
<div style="color: #cccccc;">
function moveGB(x0, xf){</div>
<div style="color: #cccccc;">
var gb = document.getElementById("gb");</div>
<div style="color: #cccccc;">
var dx = Math.abs(x0-xf) &gt; 10 ? 5 : 1;</div>
<div style="color: #cccccc;">
var dir = xf&gt;x0 ? 1 : -1;</div>
<div style="color: #cccccc;">
var x = x0 + dx * dir;</div>
<div style="color: #cccccc;">
gb.style.top = x.toString() + "px";</div>
<div style="color: #cccccc;">
if(x0!=xf){setTimeout("moveGB("+x+", "+xf+")", 10);}</div>
<div style="color: #cccccc;">
}</div>
<div style="color: #cccccc;">
&lt;/script&gt;</div>
<div style="color: #cccccc;">
</div>
<div style="color: #cccccc;">
&lt;div id="gb"&gt;</div>
<div style="color: #cccccc;">
</div>
<div style="color: #cccccc;">
&lt;div class="gbtab" onclick="showHideGB()"&gt; &lt;/div&gt;</div>
<div style="color: #cccccc;">
</div>
<div style="color: #cccccc;">
&lt;div class="gbcontent"&gt;</div>
<div style="color: #cccccc;">
</div>
<div style="color: #cccccc;">
&lt;div style="text-align:right"&gt;</div>
<div style="color: #cccccc;">
&lt;a href="javascript:showHideGB()"&gt;</div>
<div style="color: #cccccc;">
.:[Close][Klik 2x]:.</div>
<div style="color: #cccccc;">
&lt;/a&gt;</div>
<div style="color: #cccccc;">
&lt;/div&gt;</div>
<div style="color: #cccccc;">
&lt;center&gt;</div>


<b><span style="color: red;"> Masukan Kode iklan atau Gambar yang anda    inginkan di sini</span></b>



<div style="color: #cccccc;">
&lt;/center&gt;</div>
<div style="color: #cccccc;">
</div>
<div style="color: #cccccc;">
&lt;script type="text/javascript"&gt;</div>
<div style="color: #cccccc;">
var gb = document.getElementById("gb");</div>
<div style="color: #cccccc;">
gb.style.center = (30-gb.offsetWidth).toString() + "px";</div>
<div style="color: #cccccc;">
&lt;/script&gt;&lt;/center&gt;&lt;/div&gt;&lt;/div&gt;</div>
</blockquote>

6. Simpan

Untuk tulisan yang berwarna merah, bisa teman-teman ganti dengan kode iklan, gambar ataupun tulisan yang diinginkan, selamat mencoba.

0 Response to "Begini Cara Membuat Iklan Tampil Melayang Dengan Tombol Close Di Blog / Website"

Post a Comment