我想實現最新的Google菜單..(當我們打開谷歌左上角時,我們可以看到一個Google Button。當我點擊那個按鈕時,菜單會一直出現,直到另一個菜單點擊發生在文件上,懸停的那個元素菜單會出現,直到mouseout,我想實現相同的,這裏是我試過的代碼..我希望我會在這裏得到幫助。功能,例如谷歌菜單(效果)像使用CSS和jQuery的菜單一樣實現Google
HTML
<div id="content1" style="width:50px">
<span class="header">Hello</span>
<ol id="a">
<li><span class="ele">jkehfkje</span></li>
<li><span class="ele">jkehfkje</span></li>
<li><span class="ele">jkehfkje</span></li>
</ol>
</div>
<div>kufhjegfe</div>
jQuery代碼
$('#content1').hover(function() {
$('#a').fadeIn('slow');
}, function() {
$('#a').fadeOut('slow');
});
CSS
#a
{
display:none
}
.ele
{
height:20px;
width:60px;
border:1px solid black;
}
.ele:hover
{
cursor:pointer
}
here是小提琴
感謝
什麼是你的代碼問題那麼遠? – 2011-12-15 18:26:59
我想實現像谷歌菜單一樣的確切功能.. – Exception 2011-12-15 18:29:53