html 仿新浪导航css样式
2年前
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>新浪导航</title>
<style>
* {
margin: 0;
padding: 0;
}
.nav {
height: 41px;
background-color: #FCFCFC;
border-top: 4px solid #FF8500;
border-bottom: 1px solid #EDEEF0;
}
.nav a {
display: inline-block;/* 块,行内元素转为行内块 */
height: 41px;
/*background-color: green;*/
line-height: 41px;
padding: 0px 20px;
text-decoration: none;
color: #4C4C4C;
font-size: 12px;
}
.nav a:hover {
/* style */
background-color: #CCC;
}
</style>
</head>
<body>
<div class="nav">
<a href="#">设为首页</a>
<a href="#">手机新浪网</a>
<a href="#">移动客户端</a>
<a href="#">博客</a>
<a href="#">微博</a>
<a href="#">关注我</a>
</div>
</body>
</html>