用css进行导航定位

简单利用CSS进行导航定位。这是我使用最方便的了。一直没找着好的方法。

<style>
#menu{
 clear:both;
 width:100%; height:64px;
 background:url(images/menu_bg.jpg) repeat-x;
}
#menu-bg{
 width:755px; margin:auto; height:64px;
 padding-left:124px; padding-right:124px;
 background:url(images/menu_bg.jpg) repeat-x;
}
#menu-parent{
 margin:auto; height:36px; line-height:36px;
 background:url(images/menu-parent-bg.gif) no-repeat left center;
}
#menu-parent a{
 display:inline; width:93px; height:36px; line-height:35px;
 float:left; text-align:center; padding-left:1px;
 color:#FFFFFF;
}
#menu-parent a:hover,#menu-parent a:active,.menuA{
 background:url(images/menu-bg-A.gif) no-repeat right;
 color:#CCCCCC !important;
}
</style>

 

<div id="menu">
  <div id="menu-bg">
  <div id="menu-parent">
  <a href="#" class="menu-this" id="par1">网站首页</a>
  <a href="#" id="par2">关于我们</a>
  <a href="#" id="par3">新闻中心</a>
  <a href="#" id="par4">产品体系</a>
  <a href="#" id="par5">解决方案</a>
  <a href="#" id="par6">典型案例</a>
  <a href="#" id="par7">客户服务</a>
  <a href="#" id="par8">联系我们</a>  </div> 
 
  </div>
</div>

/Files/sojay/CSS.rar

转载于:https://www.cnblogs.com/sojay/archive/2009/02/07/1385967.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值