媒体查询导航条换
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.box{
width: 100%;
height: 100%;
}
#nav{
width: 80%;
height: 100px;
border: 1px solid black;
margin: 50px auto 0;
position: relative;
}
h1{
display: inline-block;
}
.meun{
display: inline-block;
float: right;
}
ul{
list-style: none;
}
li{
float: right;
margin-left: 20px;
}
@media screen and (max-width: 850px) {
.meun:before{
background: #4acaa8;
color: white;
content: "≡";
display: block;
height: 44px;
font-size: 18px;
line-height: 44px;
text-align: center;
width: 64px;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
.ulDiv{
display: none;
}
}
</style>
</head>
<body>
<div class="box">
<div id="nav">
<h1>RESUME</h1>
<div class="meun">
<ul class="ulDiv">
<li>Contact</li>
<li>Experience</li>
<li>Skills</li>
<li>Portfolio</li>
<li>Home</li>
</ul>
</div>
</div>
</div>
</body>
</html>