运用:盒模型、浮动、定位、字体对齐
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>导航条</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.box{
width: 32px;
height: 19px;
background: url(new.png);
position: relative;
left: 47%;
top: 58px;
}
.nav{
list-style: none;
background-color: #55a8ea;
width: 960px;
height: 40px;
margin:50px auto;
}
.nav li{
float: left;
margin:13px auto;
}
.nav a{
display: inline-block;
width: 100px;
height: 100%;
text-align: center;
color: white;
text-decoration: none;
font: 14px "雅黑" #fff;
}
.nav a:hover{
background-color: #00619f;
}
</style>
</head>
<body>
<div class="box"></div>
<ul class="nav">
<li><a href="#">首页</a></li>
<li><a href="#">网站建设</a></li>
<li><a href="#">程序开发</a></li>
<li><a href="#">网络营销</a></li>
<li><a href="#">企业VI</a></li>
<li><a href="#">案例展示</a></li>
<li><a href="#">联系我们</a></li>
</ul>
</body>
</html>
导航条02.png
网友评论