我有MVC 3應用程序。
在div的一個設置背景圖像。內容未加載?
#wrapper {
width: 960px;
margin: 0px auto;
background: url(../../Content/images/img01.jpg) no-repeat center top;
}
在_Layout.cshtml我寫這篇文章:
<div class="wrapper">
<!-- Some Items -->
</div>
但圖像不顯示。如果我這樣寫:
<img src="../../Content/images/img01.jpg"/>
Html-page顯示此圖像正確。
爲什麼這個圖像沒有設置div的背景?
是您在頁面上還是在不同位置的單獨樣式表中張貼的CSS? –
@NathanTaylor在不同的位置 – LuckSound