2014-10-31 190 views
-1

我的背景圖片未顯示。這裏的CSS:不顯示的背景圖片

.banner { 
    height: 25em; 
    width: 100%; 
    background: #F0F3F7 url("images/Dog_02.jpg"); 
    background-size: cover; 
} 

這裏的HTML:

背景顏色確實出現,但圖像沒有。我已經在Google Chrome瀏覽器中查看了開發者工具。它沒有列出任何錯誤。

+1

你把正確的「背景」的'url'裏面的圖像路徑? – 2014-10-31 00:08:02

+0

您能否用您的圖片保存路徑更新您的原始問題? – phantom 2014-10-31 00:08:37

+3

你的代碼在jsfiddle http://jsfiddle.net/fw9k5fbw/ – Ishita 2014-10-31 00:10:48

回答

1

enter image description here我試試這個演示工作的請嘗試,你的問題是不是把正確的路徑urlbackground image

.banner { 
     height: 25em; 
     width: 100%; 
     background:url("images/Desert.jpg"); 
     background-size: cover; 
    } 

//你的身體部分

<article class = "section group"> 
    <section class = "banner col span_8_of_8"> 
    </section> 
</article>