运用盒模型和内联元素
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>2.11_特征布局_翻页</title>
<style type="text/css">
*{
margin: 0;
padding: 0:;
}
.box{
width: 960px;
height: 42px;
border: 1px solid #C0C0C0;
margin: 0 auto;
text-align: center;
padding-top: 14px;
}
.box a{
font-family: '雅黑';
color: black;
font-size: 12px;
background-color: gold;
padding: 5px 10px;
text-decoration: none;
}
a:hover{
background-color:blue;
}
a:active{
background-color: orange;
}
</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>
特征布局_布局.png
网友评论