<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> 行内块元素的利用技巧 可以制作分页 </title>
<style>
* {
padding: 0px;
margin: 0px;
}
.page {
margin: 0 auto;
width: 1025px;
height: 100px;
border: 1px solid #dedede;
margin-top: 100px;
text-align: center;
line-height: 100px;
}
.page a {
width: 60px;
height: 50px;
background-color: #f7f7f7;
border: 1px solid #ccc;
display: inline-block;
margin-left: 5px;
text-align: center;
line-height: 50px;
color: #333;
text-decoration: none;
}
.page span {
width: 60px;
height: 50px;
background-color: #fff;
border: 1px solid #ccc;
display: inline-block;
margin-left: 5px;
text-align: center;
line-height: 50px;
color: #333;
text-decoration: none;
}
.page .pre,
.page .next {
width: 100px;
}
.page input {
outline: none;
width: 60px;
height: 50px;
border: 1px solid #ccc;
display: inline-block;
}
.page .bt {
width: 60px;
height: 50px;
border: 1px solid #ccc;
background-color: #f7f7f7;
display: inline-block;
cursor: pointer;
}
</style>
</head>
<body>
<div class="page">
<a href="" class='pre'> < < 上一页</a>
<a href="">第 2 页</a>
<span> 第 3 页</span> <!-- 当前页码 不能点点击 所以用span -->
<a href="">第 4 页</a>
<a href="">第 5 页</a>
<a href="">第 6 页</a>
<a href="">第 7 页</a>
<a href="">第 8 页</a>
<a href="">第 9 页</a>
<a href="">第 10 页</a>
到第 <input type="text" name="" id=""> 页
<input type="button" value="确定" class='bt'>
<a href="" class='next'> 下一页 > ></a>
</div>
</body>
</html>
