jquery二级下拉菜单滑动渐隐显示插件



如需定制开发(网站开发、二次开发)在线咨询,请点击>> QQ:753511799

41 162 55


特效描述:二级下拉菜单 滑动渐隐显示。jquery二级下拉菜单滑动渐隐显示插件

代码结构

1. 引入JS

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

2. HTML代码

<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
a,img{border:0;}
a,a:visited{color:#5e5e5e; text-decoration:none;}
a:hover{color:#333;text-decoration:underline;}
body{font:12px/180% Arial,Lucida,Verdana,"宋体",Helvetica,sans-serif;color:#333;background:#fff;}
/* navbox */
.navbox,.nav li,.nav li.current a,.nav li.selected a span,.nav li a.selected,.nav li a.selected span{background:url(images/headerbg.png) no-repeat;}
.navbox{height:39px;background-position:0 -138px;background-repeat:repeat-x;position:relative;z-index:9;}
.nav{width:960px;margin:0 auto;}
.nav li{float:left;height:39px;background-position:100% -99px;padding:0 3px 0 2px;position:relative;}
.nav li.last{background:none;}
.nav li a{float:left;display:block;padding:0 0 0 4px;height:39px;overflow:hidden;}
.nav li a span{float:left;display:block;padding:0 4px 0 0;line-height:39px;font-size:14px;color:#fff;font-weight:800;cursor:pointer;width:142px;text-align:center;}
.nav li.selected a,.nav li a.selected{background-position:0 -60px;text-decoration:none;}
.nav li.selected a span,.nav li a.selected span{background-position:100% -60px;color:#ff7e00;}
.nav li.selected .submenu{display:block;}
.nav li .submenu{display:none;position:absolute;top:39px;left:6px;}
.nav li .submenu{border-style:solid;border-width:0px 1px 1px 1px;border-color:#ddd;padding:0 5px 5px 5px;width:132px;background:#fff;}
.nav li .submenu{-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-box-shadow:0 5px 5px #D3D3D3;-webkit-box-shadow:0 5px 5px #D3D3D3;box-shadow:0 5px 5px #D3D3D3;}
.nav li .submenu li{float:none;padding:0;background:none;height:auto;border-bottom:dotted 1px #BEBEBE;}
.nav li .submenu li.last{border:none;}
.nav li .submenu li a{float:none;padding:0;text-align:center;height:28px;line-height:28px;background:none;}
.nav li .submenu li a:hover{background:#ddd;font-weight:800;}
</style>
<script type="text/javascript">
function dropMenu(obj){
	$(obj).each(function(){
		var theSpan = $(this);
		var theMenu = theSpan.find(".submenu");
		var tarHeight = theMenu.height();
		theMenu.css({height:0,opacity:0});
		theSpan.hover(
			function(){
				$(this).addClass("selected");
				theMenu.stop().show().animate({height:tarHeight,opacity:1},400);
			},
			function(){
				$(this).removeClass("selected");
				theMenu.stop().animate({height:0,opacity:0},400,function(){
					$(this).css({display:"none"});
				});
			}
		);
	});
}
$(document).ready(function(){
	dropMenu(".drop-menu-effect");
});
</script> 
<div class="navbox">
	<div class="nav">
		<ul class="clearfix">
			<li><a class="selected" target="_blank" href="http://www.51qianduan.com/"><span>网站首页</span></a></li>
			<li class="drop-menu-effect">
				<a target="_blank" href="http://www.51qianduan.com/"><span>jquery代码</span></a>
				<ul class="submenu">
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
				</ul>
			</li>
			<li class="drop-menu-effect">
				<a target="_blank" href="http://www.51qianduan.com/"><span>jquery图片特效</span></a>	
				<ul class="submenu">
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
				</ul>
			</li>
			<li class="drop-menu-effect">
				<a target="_blank" href="http://www.51qianduan.com/"><span>jquery导航菜单</span></a>	
				<ul class="submenu">
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
				</ul>
			</li>
			<li class="drop-menu-effect">
				<a target="_blank" href="http://www.51qianduan.com/"><span>jquery选项卡特效</span></a>
				<ul class="submenu">
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
				</ul>
			</li>
			<li class="drop-menu-effect">
				<a target="_blank" href="http://www.51qianduan.com/"><span>jquery文字特效</span></a>	
				<ul class="submenu">
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
					<li><a href="https://www.51qianduan.com/" target="_blank">51前端</a></li>
				</ul>
			</li>
		</ul>
	</div>
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滑动导航菜单 图片头像上传 二级导航菜单 滑动选项卡切换 文件上传 下拉导航菜单 图片滑动 文本框 竖直导航菜单 文字滑动 下拉框 图标导航菜单 滑动手风琴 复选 固定导航菜单 滑动星星打分 单选 侧边导航菜单 登录框 树形导航菜单 注册框 网址导航菜单 搜索框 导航菜单插件 验证码 文字导航菜单 二级联动 三级联动 城市选择 value赋值 筛选 按钮控制 购物车 颜色选择 表单提交 全选/反选 添加删除 添加标签 密码强度验证 表单验证 html5按钮动画 按钮样式 密码修改设置 滚动导航菜单 滑动导航菜单 浮动导航菜单 导航切换 右键菜单 收缩导航菜单 html5动画导航菜单 flash导航菜单 滑动滑过 切换按钮 form表单 导航菜单导航条

×
×
51前端

注册

×
绑定手机

请绑定手机号,在继续操作

×
单次下载支付

应付金额:279

支付完成后,回到下载页面,在进行下载

官方QQ群
意见反馈
qq群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到