效果:
代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>作业2</title>
<style type="text/css">
div{
display: inline-block;
width: 30px;
height: 30px;
background-color: #EEEEEE;
line-height: 30px;
}
div:hover{
background-color: #A3F178;
}
a{
text-decoration: none;
}
.num{
text-align: center;
}
</style>
</head>
<body>
<div><a href=""><<</a></div>
<div class="num"><a href=""><</a></div>
<div class="num"><a href="">1</a></div>
<div class="num"><a href="">2</a></div>
<div class="num"><a href="">3</a></div>
<div class="num"><a href="">4</a></div>
<div class="num"><a href="">5</a></div>
<div class="num"><a href="">6</a></div>
<div class="num"><a href="">7</a></div>
<div class="num"><a href="">8</a></div>
<div class="num"><a href="">9</a></div>
<div class="num"><a href="">10</a></div>
<div class="num"><a href="">...</a></div>
<div class="num"><a href="">></a></div>
<div><a href="">>></a></div>
</body>
</html>