我有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