没啥说的直接上图了
下面呢是代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
*{
color: #fff;
padding:0px;
margin:0px;
text-align: center;
}
.mast{
width: 960px;
height: 40px;
background-color: rgb(80,167,238);
margin: 300px auto;
position: relative;
}
ul{
list-style: none;
position: absolute;
}
.cc{
font-family: 微软雅黑;
font-size: 14px;
padding-top: 10px;
display: block;
width: 100px;
height: 30px;
float: left;
}
a{
width: 100%;
height: 100%;
}
a li:hover{
background-color: #00619f;
color: white:100px;
}
</style>
</head>
<body>
<div class="mast">
<ul>
<a href="zy.html"><li class="cc">首页</li></a>
<a href="zy.html"><li class="cc">网站建设</li></a>
<a href="zy.html"><li class="cc">程序开发</li></a>
<a href="zy.html"><li class="cc">网络营销</li></a>
<a href="zy.html"><li class="cc">企业VI</li></a>
<a href="zy.html"><li class="cc">案例展示</li></a>
<a href="zy.html"><li class="cc">联系我们</li></a>
</ul>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.mast{
width: 960px;
height: 42px;
border: 1px solid rgb(239,239,239);
margin: 300px auto;
position: relative;
}
ul{
list-style: none;
margin: 5px 0;
position: absolute;
left: 200px;
}
.cc{
background: gold;
font-family: 微软雅黑;
font-size: 12px;
padding: 5px 10px;
float: left;
margin-left: 5px;
}
.c{
font-family: 微软雅黑;
font: 12px ;
padding: 5px 10px;
float: left;
margin-left: 5px;
}
</style>
</center>
</head>
<body>
<div class="mast">
<ul>
<li class="cc"><a href="zy2.html">上一页</a>></li>
<li class="cc">1</li>
<li class="cc">2</li>
<li class="cc">3</li>
<li class="cc">4</li>
<li class="c">...</li>
<li class="cc">17</li>
<li class="cc">18</li>
<li class="cc">19</li>
<li class="cc">20</li>
<li class="cc">下一页</li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.mast{
width: 960px;
height: 42px;
border: 1px solid rgb(9,16,23);
margin: 300px auto;
position: relative;
}
ul{
list-style: none;
margin: 5px 0;
position: absolute;
left: 200px;
}
.cc{
font-family: 微软雅黑;
font-size: 14px;
padding: 5px 10px;
float: left;
margin-left: 5px;
}
</style>>
</head>
<body>
<div class="mast">
<ul>
<li class="cc">首页   |</li>
<li class="cc">网站建设    |</li>
<li class="cc">程序开发   |</li>
<li class="cc">网络营销   |</li>
<li class="cc">企业VI   |</li>
<li class="cc">案例提示   |</li>
<li class="cc">联系我们  </li>
</ul>
</body>