100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > jQuery实现的fixedMenu下拉菜单效果代码【jquery】

jQuery实现的fixedMenu下拉菜单效果代码【jquery】

时间:2018-10-06 23:34:36

相关推荐

jQuery实现的fixedMenu下拉菜单效果代码【jquery】

web前端|js教程

jQuery,fixedMenu,下拉菜单

web前端-js教程

本文实例讲述了jQuery实现的fixedMenu下拉菜单效果代码。分享给大家供大家参考。具体如下:

代下载网站 源码,ubuntu软件中心消失,网盘爬虫工具,sapload php,seo 优邦lzw

这里演示了仿Google风格的下拉菜单,其核心实际上是jquery.fixedMenu菜单,使用了jquery.fixedMenu.js和fixedMenu_style.css文件,已在代码中加注释,你可以从本代码中分享现这两个文件,然后重新引用。本菜单在鼠标点击主菜单的时候可向下显示二级子菜单,在火狐或Chrome浏览器下,还可显示菜单阴影效果。

互站源码免费下载,ubuntu深度装qq,tomcat服务器教程书,后羿爬虫原理,做网站选java还是php,舟山seo公司lzw

运行效果截图如下:

jsp天猫源码,vscode插件怎么传到u盘里,ubuntu 串口 名称,tomcat类的图书,js 做爬虫,php sigint,惠州关键词seo推广报价lzw

在线演示地址如下:

/js//jquery-fixedMenu-menu-style-codes/

具体代码如下:

jQuery仿Google下拉导航菜单/*fixedMenu_style.css代码*/body{padding: 0;margin: 0;}.menu{font: 13px/27px Arial,sans-serif;color: #3366CC;height: 30px;background: url(images/back.jpg) repeat-x;}.menu a: hover{background-color: #e4ebf8;}.menu a{text-decoration: none;padding: 4px 8px 7px;color: #3366CC;outline: none;}.menu ul{list-style: none;margin: 0;padding: 0 0 0 10px;}.menu ul li{padding: 0;float: left;}.menu ul li ul li{padding: 0;float: none;margin: 0 0 0 0px;width: 100%;}.menu ul li ul{position: absolute;border: 1px solid #C3D1EC;box-shadow: 0 1px 5px #CCCCCC;margin-top: -1px;display: none;padding: 0px 16px 0px 0;}.active ul{display: block !important;}.active a{background-color: white;border: 1px solid #C3D1EC;border-bottom: 0;box-shadow: 0 -1px 5px #CCCCCC;display: block;height: 29px;padding: 0 8px 0 8px;position: relative;z-index: 1;}.active a: hover{background-color: white;}.active ul a: hover{background-color: #e4ebf8;}.active ul a{border: 0 !important;box-shadow: 0 0 0 #CCCCCC;border: 0;width: 100%;}.arrow{border-color: #3366CC transparent transparent;border-style: solid dashed dashed;margin-left: 5px;position: relative;top: 10px;}//jquery.fixedMenu.js文件代码开始(function($){ $.fn.fixedMenu=function(){ return this.each(function(){ var menu= $(this); menu.find(ul li > a).bind(click,function(){ if ($(this).parent().hasClass(active)){ $(this).parent().removeClass(active); } else{ $(this).parent().parent().find(.active).removeClass(active); $(this).parent().addClass(active); } }) }); }})(jQuery);//jquery.fixedMenu.js文件代码结束$(document).ready(function(){ $(.menu).fixedMenu();});

More Examples Plugins and jQuery Examples Prototype Examples Mootools Examples Javascript ExamplesPlugins Galleries DropDown Menus Content Slider LightBoxFriend Sites 关于我们 jquery特效Contact Follow us on Twitter Facebook Rss e-mail

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