|
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <title>jquery仿http://www.oussay.com/的flash导航</title>
- </head>
- <style>
- *{ margin:0; padding:0;}
- .con{ height:40px; width:100%; overflow:hidden; position:relative; background:#9fc;}
- .nav_u{ height:26px; font:22px/26px "宋体"; font-style:italic; font-weight:bold; color:#333; position:relative;}
- .nav_d{ height:14px; font:12px/12px "宋体"; color:#333; position:relative;}
- .pos{position:relative; left:200px;}
- .con a{ text-decoration:none; display:block; color:#666}
- .nav_ub{ width:100%; height:26px; position:absolute; top:0px; background:#fff;}
- .nav_db{ width:100%; height:14px; position:absolute; bottom:0px; background:#fff;}
- </style>
- <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
- <script>
- $(document).ready(function(){
- $(".con").prepend('<div class="nav_ub"></div><div class="nav_db"></div>')
- $(".con").hover(function(){
- $(this).children(".nav_ub").stop().animate({top:-26},300);
- $(this).find(".pos").stop().animate({left:220},250);
- $(this).children(".nav_db").stop().animate({bottom:-14},300);
- $(this).find(".pos").stop().animate({left:220},250);
- },function(){
- $(this).children(".nav_ub").stop().animate({top:0},300);
- $(this).find(".pos").stop().animate({left:200},250);
- $(this).children(".nav_db").stop().animate({bottom:0},300);
- $(this).find(".pos").stop().animate({left:200},250);
- });
- })
- </script>
- <body>
- <div class="con">
- <div class="nav_u"><a class="pos" href="#">AAAAA</a></div>
- <div class="nav_d"><a class="pos" href="#">aaaaa</a></div>
- </div>
- <div class="con">
- <div class="nav_u"><a class="pos" href="#">BBBBB</a></div>
- <div class="nav_d"><a class="pos" href="#">bbbbb</a></div>
- </div>
- <div class="con">
- <div class="nav_u"><a class="pos" href="#">CCCCC</a></div>
- <div class="nav_d"><a class="pos" href="#">ccccc</a></div>
- </div>
- <div class="con">
- <div class="nav_u"><a class="pos" href="#">AABBCC</a></div>
- <div class="nav_d"><a class="pos" href="#">aabbcc</a></div>
- </div>
- <p><br />
- 供稿:<a href="mailto:wusong__1986@163.com">SD_night</a> 首发:<a href="http://www.dz12.com/" target="_blank">dz模板站</a></p>
- <p><br />
- jquery仿www.oussay.com的flash导航<br />
- <br />
- </p>
- <p>注意:由于jquery文件是外部调用,比较慢,如预览有问题,请刷新页面或保存代码到本地查看。
- <br />
- <br />
- </p>
- <p>*尊重他人劳动成果,转载请自觉注明出处!注:此代码仅供学习交流,请勿用于商业用途。</p>
- </body>
- </html>
复制代码 提示:可以先修改部分代码后再运行
jquery仿www.oussay.com的flash导航 注意:由于jquery文件是外部调用,比较慢,如预览有问题,请刷新页面或保存代码到本地查看。 |
|