• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

半度微笑

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

用滑动门制作导航(一个图片三种效果)

首先ps制作如图所示的图片

 

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>滑动门制作导航</title>
<style type="text/css">
#menu ul{
 font-family:Arial, Helvetica, sans-serif;
 font-size:14px;
 padding:0 0 0 8px;
 margin:0 auto;
 list-style:none;
 height:35px;
 white-space:normal;
 }
#menu ul li{
 float:left;
 margin:0 2px;
 }
#menu ul li a{
 display:block;
 float:left;
 line-height:35px;
 text-decoration:none;
 color:#666;
 padding:0 0 0 14px;
 background:url(bjt.gif);
 overflow:hidden;
}
#menu ul li a span{
 display:block;
 padding:0 14px 0 0;
 background:url(bjt.gif) no-repeat right top;
 overflow:hidden;
 }
#menu ul li a:hover{
 color:#fff;
 background:url(bjt.gif) no-repeat left center;
 }
#menu ul li a:hover span{
 background:url(bjt.gif) no-repeat right center;
 }
#menu ul li.current a{
 color:#fff;
 background:url(bjt.gif) no-repeat left bottom;
 
 }
#menu ul li.current a span{
 background:url(bjt.gif) no-repeat right bottom;
}
#menu ul li.current a:hover{
 background:url(bjt.gif) no-repeat left bottom;
 cursor:default;
}
#menu ul li.current a:hover span{
 background:url(bjt.gif) no-repeat right bottom;}
</style>
</head>

<body>
<div id="menu">
<ul>
    <li><a href="#"><span>Home</span></a></li>
     <li><a href="#"><span>Contact</span></a></li>
     <li><a href="#"><span>Web Dev</span></a></li>
    <li><a href="#"><span>Web Design</span></a></li>
     <li class="current"><a href="#"><span>Map</span></a></li>
     </ul>
</div>
</body>
</html>

posted on 2011-10-10 15:04  半度微笑  阅读(548)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3