jquery實(shí)現(xiàn)Slide Out Navigation滑出式菜單效果代碼
本文實(shí)例講述了jquery實(shí)現(xiàn)Slide Out Navigation滑出式菜單效果代碼。分享給大家供大家參考。具體如下:
這里介紹jquery實(shí)現(xiàn)的Slide Out Navigation跟隨鼠標(biāo)滑出的導(dǎo)航效果,鼠標(biāo)移過(guò)后菜單快速?gòu)纳系较乱瞥?,引用了新版的jQuery插件,菜單修改一下就可以用了,比如修改一下背景色或文字大小等。
運(yùn)行效果截圖如下:
在線演示地址如下:
http://demo.jb51.net/js/2015/jquery-slide-out-nav-menu-style-codes/
具體代碼如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Slide Out Navigation</title> <script type='text/javascript' src='jquery-1.6.2.min.js'></script> <style type="text/css"> body{ font-family:arial;} ul#navigation { list-style: none outside none; margin: 0; padding: 0; position: fixed; right: 10px; top: 0; width: 721px; z-index: 999999; } ul#navigation li { display: inline; float: left; width: 103px; } ul#navigation li a { background-color: #E7F2F9; background-position: 50% 10px; background-repeat: no-repeat; border: 1px solid #BDDCEF; border-radius: 0 0 10px 10px; display: block; float: left; height: 25px; margin-top: -2px; opacity: 0.7; padding-top: 80px; text-align: center; text-decoration: none; line-height:25px; width: 100px; font-size:11px; color: #60ACD8; letter-spacing: 2px; text-shadow: 0 -1px 1px #FFFFFF; } ul#navigation li a:hover { background-color: #CAE3F2; } ul#navigation .home a { background: url(images/home.png) no-repeat; } ul#navigation .about a { background: url(images/id_card.png) no-repeat; } ul#navigation .search a { background: url(images/search.png) no-repeat; } ul#navigation .podcasts a { background: url(images/ipod.png) no-repeat; } ul#navigation .rssfeed a { background: url(images/rss.png) no-repeat; } ul#navigation .photos a { background: url(images/camera.png) no-repeat; } ul#navigation .contact a { background: url(images/mail.png) no-repeat; } </style> </head> <body> <ul id="navigation"> <li class="home"><a href="">Home</a></li> <li class="about"><a href="">About</a></li> <li class="search"><a href="">Search</a></li> <li class="photos"><a href="">Photos</a></li> <li class="rssfeed"><a href="">Rss Feed</a></li> <li class="podcasts"><a href="">Podcasts</a></li> <li class="contact"><a href="">Contact</a></li> </ul> <script type="text/javascript"> $(function() { var d=300; $('#navigation a').each(function(){ $(this).stop().animate({ 'marginTop':'-80px' },d+=150); }); $('#navigation > li').hover( function () { $('a',$(this)).stop().animate({ 'marginTop':'-2px' },200); }, function () { $('a',$(this)).stop().animate({ 'marginTop':'-80px' },200); } ); }); </script> </body> </html>
希望本文所述對(duì)大家的jquery程序設(shè)計(jì)有所幫助。
- 使用jquery菜單插件HoverTree仿京東無(wú)限級(jí)菜單
- jquery仿京東導(dǎo)航/仿淘寶商城左側(cè)分類導(dǎo)航下拉菜單效果
- jQuery實(shí)現(xiàn)帶動(dòng)畫效果的多級(jí)下拉菜單代碼
- jquery實(shí)現(xiàn)標(biāo)題字體變換的滑動(dòng)門菜單效果
- jquery實(shí)現(xiàn)簡(jiǎn)單的二級(jí)導(dǎo)航下拉菜單效果
- jQuery實(shí)現(xiàn)美觀的多級(jí)動(dòng)畫效果菜單代碼
- jquery實(shí)現(xiàn)美觀的導(dǎo)航菜單鼠標(biāo)提示特效代碼
- 基于jquery實(shí)現(xiàn)的樹形菜單效果代碼
- jQuery簡(jiǎn)單實(shí)現(xiàn)仿京東商城的左側(cè)菜單效果代碼
相關(guān)文章
jQuery 綁定事件到動(dòng)態(tài)創(chuàng)建的元素上的方法實(shí)例
這篇文章介紹了jQuery 綁定事件到動(dòng)態(tài)創(chuàng)建的元素上的方法實(shí)例,有需要的朋友可以參考一下2013-08-08JS中Array數(shù)組學(xué)習(xí)總結(jié)
本文主要介紹了JS中Array數(shù)組的相關(guān)知識(shí)。具有一定的參考價(jià)值,下面跟著小編一起來(lái)看下吧2017-01-01Jquery知識(shí)點(diǎn)一 Jquery的ready和Dom的onload的區(qū)別
onload是所有dom元素創(chuàng)建完畢,圖片、css等都加在完畢后才觸發(fā) ready則是dom元素創(chuàng)建完畢后就被觸發(fā)2011-01-01一個(gè)關(guān)于jqGrid使用的小例子(行按鈕)
一個(gè)關(guān)于jqGrid使用的小例子(行按鈕) ,使用jqGrid的朋友可以參考下。2011-11-11基于jQuery實(shí)現(xiàn)網(wǎng)頁(yè)進(jìn)度顯示插件
這篇文章主要介紹了基于jQuery實(shí)現(xiàn)網(wǎng)頁(yè)進(jìn)度顯示插件的實(shí)現(xiàn)方法以及源碼下載,十分的詳細(xì),并自帶2種皮膚,這里推薦給小伙伴們。2015-03-03jQuery代碼實(shí)現(xiàn)圖片墻自動(dòng)+手動(dòng)淡入淡出切換效果
在網(wǎng)頁(yè)上經(jīng)??梢钥吹接斜尘皥D片可以自動(dòng)淡入淡入切換的效果,非常漂亮,實(shí)用性也非常高,今天小編給大家分享基于jquery代碼實(shí)現(xiàn)圖片墻自動(dòng)+手動(dòng)淡入淡出切換效果,感興趣的朋友一起學(xué)習(xí)吧2016-05-05jQuery動(dòng)態(tài)生成的元素綁定事件操作實(shí)例分析
這篇文章主要介紹了jQuery動(dòng)態(tài)生成的元素綁定事件操作,結(jié)合實(shí)例形式分析了jQuery事件綁定的原理及動(dòng)態(tài)生成的元素綁定事件相關(guān)操作技巧,需要的朋友可以參考下2019-05-05jquery中$(#form :input)與$(#form input)的區(qū)別
本節(jié)為大家介紹下jquery 中$(#form :input)與$(#form input)的區(qū)別,需要的朋友可以參考下2014-08-08