Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.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
Html Firefox中的背景图像处理&;浏览器,但不在Safari或Chrome中_Html_Css_Png_Background Image - Fatal编程技术网

Html Firefox中的背景图像处理&;浏览器,但不在Safari或Chrome中

Html Firefox中的背景图像处理&;浏览器,但不在Safari或Chrome中,html,css,png,background-image,Html,Css,Png,Background Image,我在我的身体上使用了一个背景图像,它在Firefox&Explorer中完美地显示出来,但在Safari或Chrome中根本没有显示出来。车身背景图像的代码如下所示: html Chrome和Safari只显示一个包含上述代码的空白页面,而Firefox和Explorer都按预期的全尺寸显示图像。有人知道我哪里出错了吗?到目前为止,还没有其他代码编写,因此没有任何其他代码会影响上述内容。我将背景大小更改为自动,并且在Chrome、IE和Firefox中似乎工作正常(没有Safari测试)。这是我

我在我的身体上使用了一个背景图像,它在Firefox&Explorer中完美地显示出来,但在Safari或Chrome中根本没有显示出来。车身背景图像的代码如下所示:

html


Chrome和Safari只显示一个包含上述代码的空白页面,而Firefox和Explorer都按预期的全尺寸显示图像。有人知道我哪里出错了吗?到目前为止,还没有其他代码编写,因此没有任何其他代码会影响上述内容。我将背景大小更改为自动,并且在Chrome、IE和Firefox中似乎工作正常(没有Safari测试)。这是我的建议

很奇怪,但对我来说也很“有效”。看起来更像是一个短期的解决方案,虽然有时你需要有更多的大小控制。
<body>
body
{
background:url('misc/body2.png') no-repeat;
background-size:100%;
-webkit-background-size:100%;
-moz-background-size:100%;
-o-background-size:100%;
-ms-background-size:100%;
overflow:hidden;
font-size:100%;
}
body
{
   background:url('misc/body2.png') no-repeat;
   background-size: auto;
   overflow:hidden;
   font-size:100%;
}