body,ul,li{margin:0;padding:0;}
#testnav{;height:80px;background:#333;}
.testmenu{width:320px;padding-top:45px;margin:0 auto;}
.testbox div{float:left;width:80px;height:30px;text-align:center;}
.testbox a{color:#ccc;text-decoration:none;font:700 12px/1 "宋体";}
.testbox a:hover{color:#CCEEFF;text-decoration:underline;}
.testline-box{width:100%;background:#eee;}
.testline{display:block;height:3px;width:80px;background:#999;}
<div id="testnav"> <div class="testmenu"> <div class="testbox"> <div><a href="javascript:void(0)">首页</a></div> <div><a href="javascript:void(0)">说说</a></div> <div><a href="javascript:void(0)">日志</a></div> <div><a href="javascript:void(0)">相册</a></div> </div> <div style="clear:both;"></div> <div class="testline-box"> <span class="testline"></span> </div> </div> </div>
var $line=$("span.testline");
var $w=$(".testbox > div").width();
var m=0;
$(".testbox > div").each(function(n){
var x=$w*n;
$(this).mouseenter(function(){
$line.stop(true,true).animate({"margin-left":x},"slow","easeOutBack");
});
$("a",this).click(function(){
m=x;
});
});
$(".testbox").mouseleave(function(){
$line.stop(true,true).animate({"margin-left":m},"slow","easeOutBack");
});
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有