以下是 CSS中英文双语导航菜单特效代码 的示例演示效果:
部分效果截图:
HTML代码(index.html):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS中英文双语导航菜单</title>
<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
a,img{border:0;}
body{font:12px/180% Arial, Helvetica, sans-serif, "新宋体";}
/* nav */
.nav{padding:10px 10px 0;font-size:12px;font-weight:bold;margin:40px 0 0 0;}
.nav li{float:left;margin-right:1px;display:inline;}
.nav li .bi{position:relative;z-index:0;}
.nav li .bi:hover{z-index:99;}
.nav li .bi:hover span{visibility:visible;top:0;left:0;cursor:pointer;}
.nav li .bi span{position:absolute;left:-999em;visibility:hidden;}
.nav li a,.nav li .bi span{height:24px;line-height:24px;text-decoration:none;background:#DDDDDD;color:#666666;display:block;width:80px;text-align:center;}
.nav li a:hover,.nav li .bi:hover span{color:#FFFFFF;background:#DC4E1B;}
.navbar{background:#DC4E1B;height:8px;overflow:hidden;clear:both;}
</style>
</head>
<body>
<ul class="nav">
<li><a class="bi" href="http://www.baidu.com/">Home<span>首页</span></a></li>
<li><a class="bi" href="http://www.baidu.com/">About us<span>关于我们</span></a></li>
<li><a class="bi" href="http://www.baidu.com/">Products<span>公司简介</span></a></li>
<li><a class="bi" href="http://www.baidu.com/">Services<span>联系我们</span></a></li>
<li><a class="bi" href="http://www.baidu.com/">Contact<span>联系我们</span></a></li>
</ul>
<div class="navbar"></div>
</body>
</html>