Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.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 页眉和页脚背景图像获胜';在IE8中无法显示_Html_Css_Internet Explorer 8 - Fatal编程技术网

Html 页眉和页脚背景图像获胜';在IE8中无法显示

Html 页眉和页脚背景图像获胜';在IE8中无法显示,html,css,internet-explorer-8,Html,Css,Internet Explorer 8,好吧,这让我抓狂。在IE8中,背景渐变图像不会显示在页眉或页脚中,但会显示其他背景图像。我在IE9、Firefox、Chrome、Safari或Opera方面没有问题。我已经在这里和其他地方寻找建议的解决方案,但到目前为止没有一个有效。使用HTML5和CSS3,我知道这在旧浏览器中有时很时髦 以下是页脚的代码: footer { text-align:center; color:#f9f2e7; font-size:14px; display:block; background: #26b6c

好吧,这让我抓狂。在IE8中,背景渐变图像不会显示在页眉或页脚中,但会显示其他背景图像。我在IE9、Firefox、Chrome、Safari或Opera方面没有问题。我已经在这里和其他地方寻找建议的解决方案,但到目前为止没有一个有效。使用HTML5和CSS3,我知道这在旧浏览器中有时很时髦

以下是页脚的代码:

footer {
text-align:center;
color:#f9f2e7;
font-size:14px; 
display:block;
background: #26b6c9;
background-image:url(images/bg-footer.png);
background-repeat:repeat-x;
background-attachment:scroll;
position:relative;
height:103px;
clear:both;
width:100%;
float:left;
}
下面是标题:

header {
background: #26b6c9;
background-image:url(images/bg-header.png);
background-repeat:repeat-x;
background-attachment:scroll;
margin: 0 auto;
position:relative;
height:159px;
width:100%;
float:left;
}
我试过显示:block和shor,背景代码:url(images/bg footer.png)repeat-x左上滚动;但两者都不起作用


可以找到现场的测试区域。当我注意到这个问题时,我正在开始将它转换为WordPress模板,所以CSS可能仍然有点混乱

这是因为你使用的是html5-ie8和更老的版本不支持它


试试看,这是因为你使用的是html5-ie8和更老的版本不支持它


Try或

IE 8及以下版本不知道诸如
之类的新元素。您需要在文档标题中使用类似的内容

尝试将以下内容添加到
部分:

<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->


IE 8及以下版本不知道像
这样的新元素。您需要在文档标题中使用类似的内容

尝试将以下内容添加到
部分:

<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->


因为IE8和更早版本不支持页眉和页脚标记(html5标记)。您必须首先创建它们。

因为IE8和更早版本不支持页眉和页脚标记(html5标记)。你必须先创建它们。

我觉得自己像个白痴。这是有道理的。我回家后第一件事就是试试。谢谢我觉得自己像个白痴。这是有道理的。我回家后第一件事就是试试。谢谢查看本教程您是否检查IE8是否支持您想要的HTML5功能?查看本教程您是否检查IE8是否支持您想要的HTML5功能?