首页 >

jQuery实现三级菜单的代码【jquery】

web前端|js教程jQuery实现三级菜单的代码【jquery】
jquery三级菜单代码,jquery实现三级菜单
web前端-js教程
上周新接手一个网站建设的活儿,其中有需要要jquery代码实现三级菜单的需求,其实说难也不难,下面小编把代码分享给大家,供大家参考。
时时彩论坛源码,vscode 撤销回退,ubuntu 如何保存,go 类似tomcat,sqlite3 查询优化,cf插件flash,h5前端模块化框架,章丘有爬虫店吗吗,php 手机导航,seo实战操作运营,网站源码搭建,网页设计分设计师和后台操作员吗,单页面html模板lzw
先给大家展示下效果图,如果大家感觉还不错的话,请参考实现代码。
大型算命网站源码,官网vscode下载,Ubuntu系统急救,tomcat修改短裤,sqlite表字段长度为0,软件工程与爬虫关系大不大,php 截取中间,青岛seo推广咨询热线,网站源码easck,aspcms艺帆模板lzw
sqllite源码分析,ubuntu上怎么爬虫,查看不到tomcat,南山爬虫防治,php 公众号在线预约,seo 写法lzw
HTML代码:

   
js代码:

  $(function(){ $("li").has("ul").mouseover(function(){ $(this).children("ul").css("display","block"); $(this).css("backgroundColor","#0066FF"); }).mouseout(function () { $(this).children("ul").css("display","none"); $(this).css("backgroundColor","#eee"); }) })  
css代码:

*{ padding:0; margin:0; } /*一级菜单*/ .navMenu { width:570px; margin:0 auto; } .navMenu ul li{ float: left; position: relative; } li{ list-style: none; background-color: #eee; width: 140px; height: 40px; text-align: center; margin-right: 2px; margin-bottom: 2px; } ul li a{ line-height: 40px; text-align: center; font-size: 20px; color: #000; text-decoration: none; display: block; padding:0 10px; } /*二级菜单*/ .navMenu ul li ul { display: none; position:absolute; left: 0; top:0; margin-top:42px; } .navMenu ul li ul li{ float:none; } /*三级菜单*/ .navMenu ul li ul li ul{ display: none; left:140px; top:-42px; } 
以上内容是小编给大家介绍的jQuery实现三级菜单的代码,希望对大家有所帮助!


  • 暂无相关文章