javascript代码实例教程-jQuery实现个性翻牌效果导航菜单的方法教程

发布时间:2019-01-01 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了javascript代码实例教程-jQuery实现个性翻牌效果导航菜单的方法教程脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
小宝典致力于为广大程序猿(媛)提供高品质的代码服务,请大家多多光顾小站,小宝典在此谢过。

本文实例讲述了jQuery实现个性翻牌效果导航菜单的方法。分享给大家供大家参考。具体实现方法如下:

代码如下:


<!DOCTYPE htML PubLIC "-//W3C//DTD XHTML 1.0 TransITional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html XMlns="https://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(){
&nbsp;   $("#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>

觉得可用,就经常来吧! 脚本宝典 欢迎评论哦! js脚本,巧夺天工,精雕玉琢。小宝典献丑了!

脚本宝典总结

以上是脚本宝典为你收集整理的javascript代码实例教程-jQuery实现个性翻牌效果导航菜单的方法教程全部内容,希望文章能够帮你解决javascript代码实例教程-jQuery实现个性翻牌效果导航菜单的方法教程所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。