2013-08-21 40 views
1

我認爲這是一個非常愚蠢的問題,但我無法弄清楚它! 我想做一個分頁,並用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

+1

檢查圖像路徑是否正確 –

+0

您能否提供鏈接?這樣我們可以檢查圖像是否加載? –

回答

3

如果您將display: inline-block;添加到<a />標籤中的每個標籤中,那麼應該可以使用。

a{ 
    display: inline-block; 
} 

並確保圖像的路徑是正確的。

+0

這個作品,thx! –

+0

很高興我能幫到你。 –