jQuery实现个性翻牌效果导航菜单的方法
2015-03-09 00:00
2296 查看
本文实例讲述了jQuery实现个性翻牌效果导航菜单的方法。分享给大家供大家参考。具体实现方法如下:
希望本文所述对大家的jQuery程序设计有所帮助。
<!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> <title>jQuery个性翻牌效果的导航菜单</title> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <style type="text/css"> ul,li{list-style:none;padding:0;margin:0;} #btncell{width:300px;height:100px;border:1px solid #777;margin:50px auto;} #btncell li{width:100px;float:left;height:50px;font-size:14px;text-align:center;line-height:28px;position:relative;z-index:1;} #btncell li a{display:block;height:28px;border:2px solid #333;text-decoration:none;width:50px;background:#888;overflow:hidden;position:absolute;left:25px;top:10px;} </style> <script type="text/javascript" src="js/jquery1.3.2.js"></script> <script language="javascript"> var nummove=0; var numout=0; $(function(){ $("#btncell li").hover( function(){ if(nummove==0) { nummove=1; $("a",this).animate({ height: "0px",top: "25px"}, 80,function(){nummove=0;}); $("a",this).animate({ height: "28px",top: "10px"}, 80); $("a",this).css("background","yellow"); } }, function(){ if(numout==0) { numout=1; $("a",this).animate({ height: "0px",top: "25px"}, 80,function(){numout=0;}); $("a",this).animate({ height: "28px",top: "10px"}, 80); $("a",this).css("background","#888"); numout=0; } } ) $("#btncell li a").click(function(){ $(this).parents("li").css("z-index","2") $(this).animate({ height: "558px",top: "-255px",width: "1000px",left: "-460px",opacity: 'toggle',lineHeight: '558px',fontSize: '500px'}, 1000); $(this).animate({ height: "28px",top: "10px",width: "50px",left: "25px",opacity: 'toggle',lineHeight: '28px',fontSize: '12px'}, 400); $(this).parents("li").css("z-index","1") }) }) </script> </head> <body> 预览效果时左下角会提示错误,而且看不到效果,刷新一下就可以看到效果了。<ul id="btncell"> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li><a href="#">6</a></li> </ul> </body> </html>
希望本文所述对大家的jQuery程序设计有所帮助。
相关文章推荐
- jQuery实现个性翻牌效果导航菜单的方法
- jQuery纵向导航菜单效果实现方法
- jQuery实现类似标签风格的导航菜单效果代码
- jquery实现无限分级横向导航菜单的方法
- jquery实现适用于门户站的导航下拉菜单效果代码
- jQuery实现类似标签风格的导航菜单效果代码
- jQuery实现下滑菜单导航效果代码
- jQuery实现简单的列表式导航菜单效果代码
- jQuery实现带滚动线条导航效果的方法
- jQuery实现简单的列表式导航菜单效果代码
- jquery实现向下滑出的二级导航下滑菜单效果
- jquery实现适用于门户站的导航下拉菜单效果代码
- Jquery实现带动画效果的经典二级导航菜单
- jQuery实现的向上弹出的仿flash效果的导航菜单
- jquery实现红色竖向多级向右展开的导航菜单效果
- jquery实现个人中心导航菜单效果和美观都非常不错
- jQuery实现带动画效果的二级下拉导航方法
- Jquery实现导航菜单折叠式效果
- jQuery实现菜单感应鼠标滑动动画效果的方法
- jquery实现个人中心导航菜单效果和美观都非常不错