1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > jquery实现漂亮的二级下拉菜单代码【jquery】

jquery实现漂亮的二级下拉菜单代码【jquery】

时间:2024-06-30 18:18:49

相关推荐

jquery实现漂亮的二级下拉菜单代码【jquery】

web前端|js教程

jquery,二级下拉菜单

web前端-js教程

本文实例讲述了jquery实现漂亮的二级下拉菜单代码。分享给大家供大家参考。具体如下:

微信校园餐饮源码,vscode预览卡顿,ubuntu 入门书,tomcat后台日志等级,滁州爬虫,php手册中文版 下载,湖北怎样做seo推广,html手机网站导航代码,织梦商城网站模板模板lzw

这里介绍一款基于jquery实现的网站下拉菜单,黑色风格,很漂亮,本菜单需要点击主菜单后的小三角符号才下拉出二级菜单,并不是有些菜单,是鼠标移上主菜单的时候就滑过,至于哪一种,就看个人的喜好了

图书管理系统的源码,vscode改变文件编码,ubuntu界面启动,tomcat没有安装程序,sqlite中文版怎么用,爬虫访问数据需要验证怎么办,异常类php,seo推广技术快速排名,网站导航栏半透明菜单,在线订单的模板htmllzw

先来看看运行效果:

空间网站源码下载,在ubuntu中上网,爬虫抓取论坛注册,eden php,seo转行设计lzw

在线演示地址如下:

/js//jquery-bg-2-level-down-show-menu-codes/

具体代码如下:

jQuery二级菜单$(document).ready(function(){ $("ul.subnav").parent().append(""); $("ul.topnav li span").click(function() { $(this).parent().find("ul.subnav").slideDown(fast).show(); $(this).parent().hover(function() { }, function(){ $(this).parent().find("ul.subnav").slideUp(slow); }); }).hover(function() { $(this).addClass("subhover"); }, function(){ $(this).removeClass("subhover"); });});body { margin: 0; padding: 0; font: 10px normal Arial, Helvetica, sans-serif; background: #ddd url(images/body_bg.jpg) repeat-x;}.container { width: 960px; margin: 0 auto; position: relative;}#header { padding-top: 120px;}#header .disclaimer { color: #999; padding: 100px 0 7px 0; text-align: right; display: block; position: absolute; top: 0; right: 0;}#header .disclaimer a { color: #ccc;}ul.topnav { list-style: none; padding: 0 20px; margin: 0; float: left; width: 920px; background: #222; font-size: 1.2em; background: url(images/topnav_bg.jpg) repeat-x;}ul.topnav li { float: left; margin: 0; padding: 0 15px 0 0; position: relative;}ul.topnav li a{ padding: 10px 5px; color: #fff; display: block; text-decoration: none; float: left;}ul.topnav li a:hover{ background: url(images/topnav_hover.jpg) no-repeat center top;}ul.topnav li span { width: 17px; height: 35px; float: left; background: url(images/subnav_btn.jpg) no-repeat center top;}ul.topnav li span.subhover {background-position: center bottom; cursor: pointer;}ul.topnav li ul.subnav { list-style: none; position: absolute; left: 0; top: 35px; background: #333; margin: 0; padding: 0; display: none; float: left; width: 170px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; border: 1px solid #111;}ul.topnav li ul.subnav li{ margin: 0; padding: 0; border-top: 1px solid #252525; border-bottom: 1px solid #444; clear: both; width: 170px;}html ul.topnav li ul.subnav li a { float: left; width: 145px; background: #333 url(images/dropdown_linkbg.jpg) no-repeat 10px center; padding-left: 20px;}html ul.topnav li ul.subnav li a:hover { background: #222 url(images/dropdown_linkbg.jpg) no-repeat 10px center; }#header img { margin: 20px 0 10px;}

网站首页 网页菜单ASP导航 JSP导航 导航 PHP导航 网页特效层和菜单 鼠标特效 表单特效 表格特效 CSS特效 jQuery特效搜索引擎 博客营销 联系我们

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。