Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.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 我的网站覆盖了chrome的背景,但没有IE_Css - Fatal编程技术网

Css 我的网站覆盖了chrome的背景,但没有IE

Css 我的网站覆盖了chrome的背景,但没有IE,css,Css,我的网站以chrome为背景,但不包括IE 我试过四处看看,试过一些javascript,还有一些其他的HTML解决方案,但似乎都不起作用,而且它们也很旧 这是我的CSS: body { background-image:url("images/splash.png"); width: 100%; height: auto; } 不能为主体设置宽度和高度。 需要设置 你也可以试试这个 background:url("images/splash.png") 0 0 / 1

我的网站以chrome为背景,但不包括IE

我试过四处看看,试过一些javascript,还有一些其他的HTML解决方案,但似乎都不起作用,而且它们也很旧

这是我的CSS:

body {
    background-image:url("images/splash.png");
    width: 100%;
    height: auto;
}

不能为主体设置宽度和高度。 需要设置

你也可以试试这个

background:url("images/splash.png") 0 0 / 100% auto no-repeat fixed;
所以如果你使用IE8,可以试试这个

body {
  position: fixed; 
  top: 0%; 
  left: 0%; 
  width: 100%; 
  height: 100%;
  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( src='images/splash.png', sizingMethod='scale');
  -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader( src='images/splash.png', sizingMethod='scale')";
}

你试过这两种吗


好的,谢谢,不过我的处境还是一样的。使用背景图像:url(“images/splash.png”)<代码>背景重复:不重复;背景尺寸:封面可以在chrome上运行,但不能在IE上运行:/(我似乎无法使代码格式正常工作)是的,我做到了。我开始认为这可能是我的IE有问题?你使用的是哪个版本?因为背景大小仅适用于IE9+是的,我正在运行IE8,我会假设很多人仍在使用IE8,因此我可能需要对其进行分类感谢您的帮助,我仍然处于同一条船上。这可能只是我和IE之间的问题吗?我想我可以让我的朋友来测试它。
尝试了一个javascript东西。真的很有灵感。你考虑过写一篇论文吗?
body {
  position: fixed; 
  top: 0%; 
  left: 0%; 
  width: 100%; 
  height: 100%;
  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( src='images/splash.png', sizingMethod='scale');
  -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader( src='images/splash.png', sizingMethod='scale')";
}