Menu Floating ini merupakan sedikit modifikasi dari kode untuk membuat Cbox show/hide, hanya dengan merubah posisi dan membuat backgroundnya jadi transparan.
Ikuti Step by Step:
- Login Blogger
- Klik ==>Rancangan =>Elemen Laman
- Tambah Gadget HTML/Java Script
- Copas kode berikut:
<style>
#hcl { position:fixed;
top:70px;
left:0px; z-index:+1000; }
* html #hcl {position:relative;}
.hcltab {
height:32px;
width:80px;
float:bottom;
cursor:pointer;
background:url('http://png.findicons.com/files/icons/2212/carpelinx/32/add.png')
no-repeat;
}
.hclcontent {
float:bottom;
border:0px solid #926334;
background:transparent
no-repeat;
padding:5px;
}
.hc-credit {
font-size:9px
}
.hc-credit a {
text-decoration:none
}
</style>
<script type="text/javascript">
function showHidehcl(){
var hcl = document.getElementById("hcl");
var w = hcl.offsetWidth;
hcl.opened ? movehcl(0, 30-w) : movehcl(20-w, 0);
hcl.opened = !hcl.opened; } function movehcl(x0, xf){
var hcl = document.getElementById("hcl");
var dx = Math.abs(x0-xf) > 30 ? 35 : 1;
var dir = xf>x0 ? 1 : -1;
var x = x0 + dx * dir; hcl.style.top = x.toString() + "px"; if(x0!=xf){setTimeout("movehcl("+x+", "+xf+")", 10);}
}
</script>
<div id="hcl"> <div class="hclcontent">
<center>
<a href="http://www.m-azka.com/search/label/my%20award"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhocnu-U3zsfoAufYf9F09NyyPInWVdGbj6_1O2_8ahj2kMjMPN1jdI7wwuyN515Ti1-CEneLt3sn674csZY06sbCznCHaySmB3d3u22gjL17s-Pg2Q_vtQA8TQBRAKBChH1Dgg6Xc2Z5o/" /></a>
</center>
<center>
<a href="http://www.facebook.com/m.azka.fans"target=_blank"><img style="width: 80px; height: 80px;" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpDtlglSOcxsdCMvibNPSL3PzYu073haqYcTa_tmPMxdQ441pNkvh6BEgu9Q5DnZeGm1-8Cu0JsjoQ6p8nEXsAw7RvlQeWY4bJC3ErNo9jBlr8ew-CXA1vPk307JW6iGxx7-x51EnFllk/" /></a>
</center>
<center>
<a href="http://twitter.com/mazkac"target=_blank"><img style="width: 80px; height: 80px;" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirTF8iqhOBW9LrikwAJOPgMZMxPM7ZlzMZSnSMgFb7404IgbuBnGcoG7280oKOw7Pi5DtREJ8gIfGKoquFbZnO5IOzwmJzSxOOjKL8OxRpjAaVhLMKtZ7dFy_NF8MNccmpjeuCP5HwRgU/" /></a>
</center>
</div>
<div class="hcltab" onclick="showHidehcl()">
</div>
</div>
<script type="text/javascript">
var hcl = document.getElementById("hcl"); hcl.style.top = (30-hcl.offsetWidth).toString() + "px";
</script>
#hcl { position:fixed;
top:70px;
left:0px; z-index:+1000; }
* html #hcl {position:relative;}
.hcltab {
height:32px;
width:80px;
float:bottom;
cursor:pointer;
background:url('http://png.findicons.com/files/icons/2212/carpelinx/32/add.png')
no-repeat;
}
.hclcontent {
float:bottom;
border:0px solid #926334;
background:transparent
no-repeat;
padding:5px;
}
.hc-credit {
font-size:9px
}
.hc-credit a {
text-decoration:none
}
</style>
<script type="text/javascript">
function showHidehcl(){
var hcl = document.getElementById("hcl");
var w = hcl.offsetWidth;
hcl.opened ? movehcl(0, 30-w) : movehcl(20-w, 0);
hcl.opened = !hcl.opened; } function movehcl(x0, xf){
var hcl = document.getElementById("hcl");
var dx = Math.abs(x0-xf) > 30 ? 35 : 1;
var dir = xf>x0 ? 1 : -1;
var x = x0 + dx * dir; hcl.style.top = x.toString() + "px"; if(x0!=xf){setTimeout("movehcl("+x+", "+xf+")", 10);}
}
</script>
<div id="hcl"> <div class="hclcontent">
<center>
<a href="http://www.m-azka.com/search/label/my%20award"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhocnu-U3zsfoAufYf9F09NyyPInWVdGbj6_1O2_8ahj2kMjMPN1jdI7wwuyN515Ti1-CEneLt3sn674csZY06sbCznCHaySmB3d3u22gjL17s-Pg2Q_vtQA8TQBRAKBChH1Dgg6Xc2Z5o/" /></a>
</center>
<center>
<a href="http://www.facebook.com/m.azka.fans"target=_blank"><img style="width: 80px; height: 80px;" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpDtlglSOcxsdCMvibNPSL3PzYu073haqYcTa_tmPMxdQ441pNkvh6BEgu9Q5DnZeGm1-8Cu0JsjoQ6p8nEXsAw7RvlQeWY4bJC3ErNo9jBlr8ew-CXA1vPk307JW6iGxx7-x51EnFllk/" /></a>
</center>
<center>
<a href="http://twitter.com/mazkac"target=_blank"><img style="width: 80px; height: 80px;" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirTF8iqhOBW9LrikwAJOPgMZMxPM7ZlzMZSnSMgFb7404IgbuBnGcoG7280oKOw7Pi5DtREJ8gIfGKoquFbZnO5IOzwmJzSxOOjKL8OxRpjAaVhLMKtZ7dFy_NF8MNccmpjeuCP5HwRgU/" /></a>
</center>
</div>
<div class="hcltab" onclick="showHidehcl()">
</div>
</div>
<script type="text/javascript">
var hcl = document.getElementById("hcl"); hcl.style.top = (30-hcl.offsetWidth).toString() + "px";
</script>
5. Lalu Save Template, Lihat hasilnya dan enjoy!
Keterangan:
- Kode warna biru : url image untuk "show/hide" menu [Tidak diganti juga tidak apa-apa]
- Kode warna orange : URL/Link tujuan icon sobat
- Kode warna merah : URL Icon [sobat dapat juga menggantinya dengan Icon yang lain]
- Kode warna Hijau : Bisa diganti dengan right bila ingin di kanan.
- Kode warna Hijau : Bisa diganti dengan right bila ingin di kanan.
- Icon yang digunakan saat ini:
- Menu bisa ditambahkan dan ini kodenya :
<center>
<a href="LINK SOBAT"><img border="0" src="URL ICON SOBAT" /></a>
</center>
bagaimana caranya menurunkan penempatan menu nya bisa gak ma... balas di email saya junie.art@gmail.com
BalasHapuscoba di ubah height:..px; hehe
BalasHapuso yang hight ya aq kmrn gantinya yang top makanya g berubah.....
BalasHapusterimakasih banyak mas bro.... nice blog
ga kebalik ya? wkw coba ubah juga weightnya.. ngulik aja deh hahaha pasti bisa kok :D
BalasHapusKalau kita buat seperti thickbox saat gambar diklik gimana caranya gan??
BalasHapusAku masih bingung..
Mohon pencerahannya gan..
http://www.arpegio-rizal.co.cc/
aku coba terapkan di blogku mas, thanks
BalasHapusthanks infonya mas, mantap...
BalasHapusmasih bingung brow , , pas Q save kok error , , ??
BalasHapuskenapa ya ????
Masa sih gan? ane bisa kok.. di coba lagi gan..
BalasHapus