jquery模仿flash导航

jquery模仿flash导航



<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.lanrentuku.com/" target="_blank">懒人图库</a></p>
<p><br />
jquery仿www.oussay.com的flash导航<br />
<br />
</p>

<p>注意:由于jquery文件是外部调用,比较慢,如预览有问题,请刷新页面或保存代码到本地查看。
<br />
<br />
</p>
<p>*尊重他人劳动成果,转载请自觉注明出处!注:此代码仅供学习交流,请勿用于商业用途。</p>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值