0
如果我使用以下背景不会出现。CSS背景不显示使用背景属性
background:url('Background.jpg')cover no-repeat center;
如果我使用谨慎的背景属性,背景将显示正确。
background-image: url('Background.jpg');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
它们不等价吗?我错过了明显的东西吗? 最终,我需要分层多个图像,所以我需要获取背景声明才能工作。
同样的结果,Firefox 24.0或Chrome浏览器并没有什么区别。
确定的路径Background.jpg是正确的?如果您不确定并且不知道如何检查开发工具,请尝试将其加载到常规图像标记中。 – Geuis
感谢Adrift斜线修复了它 – user2840625