我认为这是一个非常愚蠢的问题,但我想不通!我想做一个分页,并用css样式。
这是我的css:
.pagination {
height:14px;
width:auto;
float:right;
}
.first {
width:14px;
height:14px;
background:url('../images/first.png');
margin:0 3px;
}
.last {
width:14px;
height:14px;
background:url('../images/last.png');
margin:3px;
}
.next {
width:7px;
height:14px;
background:url('../images/next.png');
margin:3px;
}
.previous {
width:7px;
height:14px;
background:url('../images/previous.png');
margin:3px;
}
HTML是这样的:
<div class="pagination">
<a href="#" class="first"></a>
<a href="#" class="previous"></a>
<a href="#" class="next"></a>
<a href="#" class="last"></a>
</div>
但是在网站上什么都看不到。
有人可以帮忙吗?Thx
如果将display: inline-block;
添加到每个<a />
标记的样式中,那么这应该会起作用。
a{
display: inline-block;
}
并确保图像的路径是正确的。