菜单导航显示样式
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>导航条</title>
<style type="text/css">
*{
margin: 0;padding: 0;list-style: none;
}
.list{
width: 100%;
background: #ccc;
margin: 0 auto;
}
.list li{
float: left;
width: 50px;
height: 35px;
line-height: 35px;
text-align: center;
margin-left: 5px;
margin-top: 15px;
background: pink;
}
.web{
position: absolute;
}
.menu{
position: relative;
left: 0px;
top: 0px;
display: none;
/*top: 35px;*/
}
.menu li {
float: none;
background: blue;
color: white;
margin: 0px;
margin-bottom: 5px;
}
.list>li:hover .menu{
display: block;
}
</style>
</head>
<body>
<ul class="list">
<li class="Web">Web
<ul class="menu">
<li>Css</li>
<li>Jquery</li>
<li>Html</li>
</ul>
</li>
<li>PHP</li>
<li>C++</li>
</ul>
</body>
</html>