Social Icons

Kamis, 13 Desember 2012

Cara Membuat Menu Up Down

Cara Membuat Menu Up Down


Menu ini naik turun ini sangat unik sekali karena setiap kita mengarahkan cursor mouse maka menu ini akan Bergerak naik turun sesuai dengan gambar yang akan anda pilih, Menu ini sangat unik dan cocok untuk semua tampilan di blog anda, dan Anda juga dapat menentukan menu link pada menu ini.



Copy Paste script kodenya di bawah ini :



<script src="http://kiki-efendi.googlecode.com/files/jquery-1.3.1.min.js" type="text/javascript">
</script>
<script src="http://kiki-efendi.googlecode.com/files/jquery.easing.1.3.js" type="text/javascript">
</script>
<script>$(document).ready(function () {

var top_val = $('#menu li a').css('top');

$('#menu li.selected').children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:500});

$('#menu li').hover(
function () {

$(this).children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:500});
},
function () {

$(this).children('a').stop().animate({top:top_val}, {easing: 'easeOutQuad', duration:500});

//By www.kikiyo.co.cc
$('#menu li.selected').children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:500});
}
);

});

</script>

<style>

#menu {
list-style:none;
padding:0;
margin:0 auto;;
height:70px;
width:600px;
}

#menu li {
float:left;
width:109px;
height:inherit;
position:relative;
overflow:hidden;
}

#menu li a {
position:absolute;
top:20px;
text-indent:-999em;
background:url(http://lh3.ggpht.com/_VyCMMkwhjoA/TF7b3tW6WFI/AAAAAAAAAmY/nGZNuniAreg/menu.png) no-repeat 0 0;
display:block;
width:109px;
height:inherit;

/* fast png fix for ie6 */
position:relative;
behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
this.src = "transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
this.runtimeStyle.backgroundImage = "none")),this.pngSet=true));
}

</style>

<ul id="menu">
<li><a href="http://wizyuloverz.blogspot.com/2011/03/cara-membuat-menu-up-down.html">Item 1</a></li>
<li><a href="http://wizyuloverz.blogspot.com/2011/03/cara-membuat-menu-up-down.html">Item 2</a></li>
<li class="selected"><a href="http://wizyuloverz.blogspot.com/2011/03/cara-membuat-menu-up-down.html">Item 3</a></li>
<li><a href="http://wizyuloverz.blogspot.com/2011/03/cara-membuat-menu-up-down.html">Item 4</a></li>
<li><a href="http://wizyuloverz.blogspot.com/2011/03/cara-membuat-menu-up-down.html">Item 5</a></li>
</ul>


 
Keterangan :


  • Tulisan Berwarna Kuning Dapat Anda Ganti Dengan Alamat Link URL anda

  • Tulisan Berwarna Merah Dapat Anda Ganti dengan Alamat URL Gambar yang anda Suka


sumber : http://wizyuloverz.blogspot.com

Artikel Terkait


[archives limit=10]


Tidak ada komentar:

Posting Komentar