<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>导航栏test</title>
<style>
* {
margin: 0;
padding: 0;
}
.nav {
height: 41px;
background: #FCFCFC;
/*上边框*/
border-top: 3px solid #FF8500;
/*下边框*/
border-bottom: 1px solid #EDEEF0;
}
.nav a {
/*转为行内块*/
display: inline-block;
height: 41px;
/*行高等于高度文字垂直居中*/
line-height: 41px;
padding: 0 20px;
font-size: 12px;
text-decoration: none;
color: #4C4C4C;
}
.nav a:hover {
background-color: #eee;
}
</style>
</head>
<body>
<div class="nav">
<a href="#">首页</a>
<a href="#">手机新浪网</a>
<a href="#">移动客户端</a>
<a href="#">博客</a>
<a href="#">微博</a>
</div>
</body>
</html>