2010-11-15 75 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

相关问题