2014-10-27 64 views
0

我无法为快捷中的部分标签创建背景图片。我尝试了几种不同的路径,包括:css背景网址不能在快递中工作

#image{ 
background: url('/images/beachPierPanorama.jpg') 50% 0 no-repeat fixed; 
} 

#image{ 
background: url('./images/beachPierPanorama.jpg') 50% 0 no-repeat fixed; 
} 

#image{ 
background: url('../images/beachPierPanorama.jpg') 50% 0 no-repeat fixed; 
} 

这是我的文件目录的图片。您在上面看到的CSS位于style.css中,我试图引用图像中的图像文件夹:

![IMG]http://i58.tinypic.com/dcbrkx.png[/IMG] 
+0

我想看看哪一个实际上将图像加载到节标记中。目录结构的图像可以在http://i58.tinypic.com/dcbrkx.png – user3294779 2014-10-27 00:10:13

回答

0

根据事先知情同意,该/images目录是在/public所以

background: url('../public/images/beachPierPanorama.jpg').... 

应该始终有效。

+0

找到仍然无法正常工作。我不知道它是否与我的其他CSS/HTML,而不是文件路径。 – user3294779 2014-10-27 00:18:17