jQuery實(shí)現(xiàn)灰藍(lán)風(fēng)格標(biāo)準(zhǔn)二級下拉菜單效果代碼
本文實(shí)例講述了jQuery實(shí)現(xiàn)灰藍(lán)風(fēng)格標(biāo)準(zhǔn)二級下拉菜單效果代碼。分享給大家供大家參考。具體如下:
這是一款基于jQuery實(shí)現(xiàn)的標(biāo)準(zhǔn)型二級菜單,是漂亮的灰-藍(lán)風(fēng)格下拉級聯(lián)菜單,代碼經(jīng)過了完美修正,目前兼容性已經(jīng)很不錯(cuò)了,甚至不用修改,拷貝代碼你就可以用了。
運(yùn)行效果截圖如下:
在線演示地址如下:
http://demo.jb51.net/js/2015/jquery-blue-color-style-nav-menu-codes/
具體代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery標(biāo)準(zhǔn)型二級菜單</title> <script type="text/javascript" src="jquery-1.6.2.min.js"></script> <style type="text/css"> body { margin:0; padding:0; font-size:12px; } a:link { color:#1553a9; text-decoration: none; } a:visited { text-decoration:none; color: #1553a9; } a:hover { text-decoration:none; color: #f46662; } a:active { text-decoration: none; color:#f46662; } #main { width:910px; margin:0 auto; } #menu { margin-top:20px; position:absolute; } .m1 { float:left; width:100px; text-align:center; color:#3a3a3a; background-color:#bcbcbc; border:#9a9b9b 1px solid; border-right:0; padding:10px; padding-top:13px; cursor:pointer; } .m1:hover { background-color:#2c85e0; color:White; } .m2 { position:absolute; margin-top:39px; width:120px; background-color:#e4e4e4;border:#cdcece 1px solid;color:#666666; display:none; } .m2 table { width:100%; line-height:35px; } .m2 table tr td { text-align:center; border-top:#b4b4b4 1px dotted; cursor:pointer; } </style> <script type="text/javascript"> $(function(){ $(".m1").mouseover(function(){ $(this).parent().next(".m2").fadeIn(); }).mouseout(function(){ $(this).parent().next(".m2").css("display","none"); }); $(".m2").mouseover(function(){ $(this).css("display","block"); $(this).prev().children().css("background-color","#2c85e0").css("color","White");; }).mouseout(function(){ $(this).css("display","none"); $(this).prev().children().css("background-color","#bcbcbc").css("color","#3a3a3a"); }); }); </script> </head> <body> <div id="main"> <div id="menu"> <a href="#" target="_blank"><span class="m1">論壇首頁</span></a> <a href="#" target="_blank"><span class="m1">學(xué)生工作</span></a> <div class="m2" style="left:121px;"><table> <tr><td style="border:0"><a href="#" target="_blank">學(xué)院首頁</a></td></tr> <tr><td><a href="#" target="_blank">學(xué)院首頁</a></td></tr> <tr><td><a href="#" target="_blank">學(xué)院首頁</a></td></tr> </table></div> <a href="#" target="_blank"><span class="m1">師資隊(duì)伍</span></a> <div class="m2" style="left:242px;"><table> <tr><td style="border:0"><a href="#" target="_blank">學(xué)院首頁</a></td></tr> <tr><td><a href="#" target="_blank">學(xué)院首頁</a></td></tr> <tr><td><a href="#" target="_blank">學(xué)院首頁</a></td></tr> </table></div> <a href="#" target="_blank"><span class="m1">學(xué)科專業(yè)</span></a> <div class="m2" style="left:363px;"><table> <tr><td style="border:0"><a href="#" target="_blank">本科專業(yè)</a></td></tr> <tr><td><a href="#" target="_blank">碩士專業(yè)</a></td></tr> <tr><td><a href="#" target="_blank">博士專業(yè)</a></td></tr> </table></div> <a href="#" target="_blank"><span class="m1">教學(xué)改革</span></a> <div class="m2" style="left:484px;"><table> <tr><td style="border:0"><a href="#" target="_blank">教學(xué)體制</a></td></tr> <tr><td><a href="#" target="_blank">學(xué)院首頁</a></td></tr> <tr><td><a href="#" target="_blank">科研教學(xué)</a></td></tr> </table></div> <a href="#" target="_blank"><span class="m1">黨建工作</span></a> <div class="m2" style="left:605px;"><table> <tr><td style="border:0"><a href="#" target="_blank">學(xué)生黨建</a></td></tr> <tr><td><a href="#" target="_blank">學(xué)院黨建</a></td></tr> </table></div> <a href="#" target="_blank"><span class="m1">聯(lián)系我們</span></a> <div class="m2" style="left:725px;"><table> <tr><td style="border:0"><a href="#" target="_blank">老師電話</a></td></tr> <tr><td><a href="#" target="_blank">領(lǐng)導(dǎo)傳真</a></td></tr> <tr><td><a href="#" target="_blank">學(xué)校地址</a></td></tr> <tr><td><a href="#" target="_blank">衛(wèi)星地圖</a></td></tr> </table></div> </div> </div> </body> </html>
希望本文所述對大家的jquery程序設(shè)計(jì)有所幫助。
相關(guān)文章
jQuery原理系列-css選擇器的簡單實(shí)現(xiàn)
下面小編就為大家?guī)硪黄猨Query原理系列-css選擇器的簡單實(shí)現(xiàn)。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2016-06-06jquery.validate自定義驗(yàn)證用法實(shí)例分析【成功提示與擇要提示】
這篇文章主要介紹了jquery.validate自定義驗(yàn)證用法,結(jié)合實(shí)例形式分析了jQuery成功提示與擇要提示驗(yàn)證操作相關(guān)實(shí)現(xiàn)與使用技巧,需要的朋友可以參考下2020-06-06jQuery實(shí)現(xiàn)的form轉(zhuǎn)json經(jīng)典示例
這篇文章主要介紹了jQuery實(shí)現(xiàn)的form轉(zhuǎn)json功能,結(jié)合完整實(shí)例形式分析了jQuery將form表單數(shù)據(jù)封裝成json傳輸?shù)木唧w步驟與相關(guān)操作技巧,需要的朋友可以參考下2017-10-10jQuery Validate 相關(guān)參數(shù)及常用的自定義驗(yàn)證規(guī)則
這篇文章主要介紹了jQuery Validate 相關(guān)參數(shù)及常用的自定義驗(yàn)證規(guī)則,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2017-03-03jQuery實(shí)現(xiàn)購物車的總價(jià)計(jì)算和總價(jià)傳值功能
這篇文章主要介紹了jQuery實(shí)現(xiàn)購物車的總價(jià)計(jì)算和總價(jià)傳值功能 ,代碼簡單易懂,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2018-11-11jquery地址欄鏈接與a標(biāo)簽鏈接匹配之特效代碼總結(jié)
jquery如何獲取地址欄參數(shù),改變地址欄樣式,接下來,通過本篇文章給大家分享jquery地址欄鏈接與a標(biāo)簽鏈接匹配之特效代碼總結(jié),需要的朋友可以參考下2015-08-08EasyUI修改DateBox和DateTimeBox的默認(rèn)日期格式示例
本篇文章主要介紹了EasyUI修改DateBox和DateTimeBox的默認(rèn)日期格式示例,具有一定的參考價(jià)值,有興趣的可以了解一下。2017-01-01JQuery 綁定select標(biāo)簽的onchange事件,彈出選擇的值,并實(shí)現(xiàn)跳轉(zhuǎn)、傳參
JQuery 綁定select標(biāo)簽的onchange事件,彈出選擇的值,并實(shí)現(xiàn)跳轉(zhuǎn)、傳參(selected的值和頁面其它元素的值)2011-01-01