Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS背景不使用背景属性显示_Css - Fatal编程技术网

CSS背景不使用背景属性显示

CSS背景不使用背景属性显示,css,Css,如果我使用以下选项,背景不会出现 背景:url('background.jpg')覆盖无重复中心 如果我使用谨慎的背景属性,背景会正确显示 background-image: url('Background.jpg'); background-size: cover; background-repeat: no-repeat; background-position: center; 它们不相等吗?我错过了什么明显的东西吗? 最终,我需要将多个图像分层,以便让背景语句正常工作 Firefox

如果我使用以下选项,背景不会出现

背景:url('background.jpg')覆盖无重复中心

如果我使用谨慎的背景属性,背景会正确显示

background-image: url('Background.jpg');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
它们不相等吗?我错过了什么明显的东西吗? 最终,我需要将多个图像分层,以便让背景语句正常工作


Firefox 24.0或Chrome浏览器中的相同结果没有任何区别。

使用CSS3时,必须使用
/
属性将
背景位置
背景大小
分开;而是使用:

background: url('Background.jpg') no-repeat center / cover;

示例:

使用CSS3时,必须使用
/
属性将
背景位置
背景大小
分开;而是使用:

background: url('Background.jpg') no-repeat center / cover;

示例:

您确定Background.jpg的路径正确吗?如果您不确定并且不知道如何签入开发工具,请尝试将其加载到常规图像标记中。感谢您将斜杠浮动到修复位置。您确定Background.jpg的路径正确吗?如果您不确定并且不知道如何签入开发工具,请尝试将其加载到常规图像标记中。谢谢您,斜杠修复了它