2014-10-27 28 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