html+css二级菜单制作!

二级菜单!!<!DOCTYPE html<html lang="e<head>

    <meta charset="UTF-8">
<title>Title</title>
<style>
*{
padding: 0;
margin: 0;
}
.er{
width: auto;
background-color: antiquewhite;
}
a{
text-decoration: none;
}
.er ul{
width: 1200px;
height: 40px;
margin: auto;
text-align: center;
}
.er ul li{
position: relative;
width: 16%;
list-style: none;
float: left;
margin-top: 10px;
}
.er ul li ol{
position: absolute;
top: -100px;
height: 50px;

list-style: none;
display: none;

.er ul li ol li{
width: 100%;
}
ul li:hover ol{
position: absolute;
top: 20px;

display: block;

}
</style>
</head>
<body>
<div class="er">
<ul>
<li>
<a href="">首页</a>
<ol>
<li><a href="">第一页</a></li>
<li><a href="">第二页</a></li>
<li><a href="">第三页</a></li>
<li><a href="">第四页</a></li>
<li><a href="">第五页</a></li>
</ol>
</li

</ul>
</div>
</body>
</html>
 
posted @ 2016-04-24 21:00  三石!  阅读(786)  评论(0编辑  收藏  举报