我的背景圖像沒有顯示,它讓我瘋狂,因爲我知道這很容易。有背景圖像沒有顯示的問題
下面的div類是我試圖讓背景顯示的地方。
.sun-face{
background-image: url("./images/Sun_face.svg");
}
<div class="sun-face"></div>
我的文件目錄結構像這樣。
ROOT
-css
-fonts
-images
-js
index.html
navbar.html
signin.html
試試這個background-image:url(「images/Sun_face.svg」); –
我試過沒有運氣:( –
.sun-face {}可以在index.html文件中出現。對吧? –