代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>翻页布局</title>
<style type="text/css">
*{
padding:0px;
margin:0px;
}
.box{
width:958px;
height:40px;
border:1px gray solid;
margin:0 auto;
}
a{
display:inline-block;
padding:5px 10px;
margin:0 auto;
background-color:gold;
font-family: 微软雅黑;
font-size:12px;
color:black;
position:relative;
text-decoration:none;
left:244px;
top:5px;
}
span{
display: inline-block;
padding:5px 10px;
margin:0 auto;
background-color:white;
font-family: 微软雅黑;
font-size:12px;
color:black;
position:relative;
text-decoration:none;
left:244px;
top:5px;
}
a:hover{
color: red;
}
</style>
</head>
<body>
<div class="box">
<a href="#">上一页</a>
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<span>...</span>
<a href="#">17</a>
<a href="#">18</a>
<a href="#">19</a>
<a href="#">20</a>
<a href="#">下一页</a>
</div>
</body>
</html>
效果如图:
选区_036.png
网友评论