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
Html 背景图像不显示在任何IE版本上_Html_Css_Background Image - Fatal编程技术网

Html 背景图像不显示在任何IE版本上

Html 背景图像不显示在任何IE版本上,html,css,background-image,Html,Css,Background Image,这是我的代码,它不适用于任何版本的IE- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.1)), color-stop(100%,rgba(255,255,255,0))), url("../img/archi.png") repeat 0 0; background: -moz-gradient(linear, left top, left bottom,

这是我的代码,它不适用于任何版本的IE-

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.1)), color-stop(100%,rgba(255,255,255,0))), url("../img/archi.png") repeat 0 0;
background: -moz-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.1)), color-stop(100%,rgba(255,255,255,0))), url("../img/archi.png") repeat 0 0;
background: gradient(to linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.1)), color-stop(100%,rgba(255,255,255,0))), url("../img/archi.png") repeat 0 0;
background: -o-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.1)), color-stop(100%,rgba(255,255,255,0))), url("../img/archi.png") repeat 0 0;     

CSS3渐变背景仅在IE10和IE11中通过定位
-ms-
前缀起作用。但是,您可以使用非标准渐变<代码>过滤器进行以下操作

我建议使用以下类似的方法来生成渐变

它将为您提供导入当前CSS的选项,以生成与交叉浏览器相对兼容的输出

但是,在编写渐变的方式中存在一些语法错误,应该对它们进行排序,以便最符合标准的是列表中的最后一个(MS的过滤器无法承受)。以下是它们应该是什么:

background: url("../img/archi.png") repeat 0 0; /* fallback for gradient */
background: -moz-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%), url("../img/archi.png") repeat 0 0; /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.1)), color-stop(100%,rgba(255,255,255,0))), url("../img/archi.png") repeat 0 0; /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,0.1) 0%,rgba(255,255,255,0) 100%), url("../img/archi.png") repeat 0 0; /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,0.1) 0%,rgba(255,255,255,0) 100%), url("../img/archi.png") repeat 0 0; /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,0.1) 0%,rgba(255,255,255,0) 100%), url("../img/archi.png") repeat 0 0; /* IE10+ */
background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%,rgba(255,255,255,0) 100%), url("../img/archi.png") repeat 0 0; /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1affffff', endColorstr='#00ffffff',GradientType=0 ); /* IE6-9 */

更新我的答案后,你接受了,因为我忘记了添加您的图像到梯度的结尾。现在修好了。