简单的水平菜单

<!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>无标题文档</title>
<style>
*{margin:0;padding:0;}
nav.list1{margin:50px;width:150px;}
.list1 ul{border:1px solid #f00;border-radius:3px;
padding:5px 10px 3px;}
.list1 li{list-style-type:none;}
.list1 li + li a{border-top:1px solid #f00;}
.list1 a{ display:block;text-decoration:none; padding:3px 10px; font-size:20px; color:#000;background:#ffed53;}
.list1 a:hover{color:#069;}

.list2 ul{overflow:hidden;}
.list2 li{float:left;list-style-type:none;}
.list2 a{display:block;padding:0 16px; text-decoration:none;color:#999;}
.list2 li + li a{border-left:1px solid #aaa;}
.list2 a:hover{color:#555;}

</style>
</head>

<body>
<nav class="list1">
	<ul>
    	<li><a href="#">Alternative</a></li>
        <li><a href="#">Country</a></li>
        <li><a href="#">Jazz</a></li>
        <li><a href="#">Rock</a></li>
    </ul>
</nav>
<nav class="list2">
	<ul>
    	<li><a href="#">Alternative</a></li>
        <li><a href="#">Country</a></li>
        <li><a href="#">Jazz</a></li>
        <li><a href="#">Rock</a></li>
    </ul>
</nav>
</body>
</html>

  

 

posted on 2015-05-08 12:01  防空洞123  阅读(164)  评论(0编辑  收藏  举报

导航