菜单导航显示样式

Original 2019-03-15 19:59:56 210
abstract:<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>导航条</title> <style type="text/css"> *{ margin: 0;padding: 0;list-style: none;
<!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>


Correcting teacher:查无此人Correction time:2019-03-16 09:42:02
Teacher's summary:完成的不错。写好了样式,可以保存下来,以后项目中,直接拿来参照。继续加油

Release Notes

Popular Entries