2010-11-15 81 views
0

這裏是我page爲什麼我需要添加重複以使其顯示?

這裏是我的CSS

dot { 
background:url("images/non_selected.png") repeat scroll 22px 22px transparent; 
height:22px; 
width:22px; 
} 

當我將其更改爲

url("images/non_selected.png") norepeat scroll 22px 22px transparent 

沒有顯示...什麼給

回答

4

no-repeatnorepeat。讓我知道如果這不能解決它。

編輯#1:你是太多抵消它...嘗試

background: url(http://dev.posnation.com/build_system/css/images/non_selected.png) no-repeat 0px 0px; 
+0

它還沒有顯示看看 – Trace 2010-11-15 21:49:23

+2

你的意思是'.dot'? – 2010-11-15 21:51:41

+0

更改'22px 22px'爲'0 0' – 2010-11-15 21:53:38

2

這是因爲你已經通過22個像素偏移的背景圖像。該圖像在dot範圍之外開始,因此除非您重複該圖像,否則它不會顯示。相反,請嘗試:

background: url("images/non_selected.png") no-repeat scroll left top; 

重要的部分是將「22px 22px」更改爲「left top」。

+0

我試過了,它並不奇怪 – Trace 2010-11-15 22:12:31

相關問題