当前位置:首页 > 网页特效 > 导航菜单 >

纯CSS打造中英文双语导航菜单

时间:2014-06-11 08:26 来源:互联网 作者:源码搜藏 收藏 推荐

运行代码 保存代码 复制代码 提示:您可以先修改部分代码再运行,保存代码功能在Firefox下无效。
  • 用纯CSS打造的中英文双语导航菜单,主要用到CSS的A链接属性,本代码比较简洁,而且结构也很清淅,CSS初学者一看就会。
  • <style type="text/css">
    a{
      color: #FFFF99;
      text-decoration: none;
    }
     
    a:hover{
      color: #FFF;
      text-decoration: underline;
    }
       
    #nav{
      padding: 10px 10px 0;
      font-size: 12px;
      font-weight: bold;
      margin: 1em 0 0;
      list-style:none;
    }
     
    #nav li{
      float: left;
      margin-right: 1px;
    }
     
    .bi{
      position: relative;
      z-index: 0;
    }
     
    .bi:hover{
      z-index: 99;
    }
     
    .bi:hover span{
      visibility: visible;
      top: 0;
      left: 0;
      cursor: pointer;
    }
     
    .bi span{
      position: absolute;
      left: -999em;
      visibility: hidden;
    }
     
    #nav li a,.bi:hover span{
      line-height: 20px;
      text-decoration: none;
      background: #DDD;
      color: #666;
      display: block;
      width: 80px;
      text-align: center;
    }
     
    #nav li a:hover,.bi:hover span{
      color: #FFF;
      background: #DC4E1B;
    }
     
    .bi:hover span{
      padding-top: 2px;
    }
     
    #navbar{
      background: #DC4E1B;
      height: 8px;
      overflow: hidden;
      clear: both;
    }
     
    </style>
由源码搜藏网整理,转载请注明出处https://www.codesocang.com/tx-daohang/9084.html

导航菜单下载排行

最新文章