代码简介:

很漂亮、代码很简洁的CSS导航条,鼠标放上更换菜单背景颜色,简单才是应道理,希望你们喜欢。

代码内容:

<!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=gb2312" />
<title>CSS绿色导航代码_网页代码站(www.webdm.cn)</title>
</head>
<style>
#tablist{
padding: 3px 0;
margin-left: 0;
margin-bottom: 0;
margin-top: 0.1em;
font: bold 12px Verdana;
border-bottom: 1px solid green;
}

#tablist li{
list-style: none;
display: inline;
margin: 0;
}

#tablist li a{
text-decoration: none;
padding: 3px 0.5em;
margin-right: 3px;
border: 1px solid green;
border-bottom: none;
background: lightgreen;
}

#tablist li a:link, #tablist li a:visited{
color: navy;
}

#tablist li a:hover,#tablist li a.current{
color: white;
background: green;
border-color: green;
}
</style>
</head>
<body>
<ul id="tablist">
<li><a class="current" href="/">WebDm.Cn</a></li>
<li><a href="http://www.yahoo.com">Yahoo</a></li>
<li><a href="/">Sohu.com</a></li>
<li><a href="http://www.sina.com">Sina.com</a></li>
</ul>
</body>
</html>