Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.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 IE7和IE8背景色_Css_Internet Explorer_Html_Internet Explorer 7 - Fatal编程技术网

Css IE7和IE8背景色

Css IE7和IE8背景色,css,internet-explorer,html,internet-explorer-7,Css,Internet Explorer,Html,Internet Explorer 7,出于某种奇怪的原因,我在模式中加载时设置的任何背景样式(如果有任何区别的话)都不会在IE7或IE8中渲染。在包括IE9在内的所有其他真实浏览器中,这一切看起来都非常好。我的代码如下: <hgroup> <h6>Request Information Form</h6> <a href="#" onClick="closeModal(); return false;"><img src="/images/x-close.png" alt="C

出于某种奇怪的原因,我在模式中加载时设置的任何背景样式(如果有任何区别的话)都不会在IE7或IE8中渲染。在包括IE9在内的所有其他真实浏览器中,这一切看起来都非常好。我的代码如下:

<hgroup>
<h6>Request Information Form</h6>
 <a href="#" onClick="closeModal(); return false;"><img src="/images/x-close.png" alt="Close" class="close" /></a>
</hgroup>
另外,我已经声明为display:block,我正在使用IE垫片。所有我一直得到的是一个白色的背景,这真的不工作时,我有白色的文本块


提前感谢您提供的所有帮助。

IE7和IE8不会将html5标记名加载到文档中。将忽略任何无法识别的标记。尝试添加一些javascript来手动添加它们,或者使用类似modernizr.js的东西

<script>
document.createElement('header');
document.createElement('hgroup');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
</script>
在模态中加载,如果 有什么区别吗

模态窗口是否使用iframe

如果是这样,您还需要在iframe中运行HTML5元素填充脚本。

使用

在一个稍微无关的注释中,您使用的是错误的。它应该只包含一个或多个hN元素,没有更多


使用上面的代码,您应该改为使用。

hgroup是作为HTML 5的一部分引入的,据我所知IE7和IE8不支持此标记。刚刚发现,就在您发布此答案之前……我再次检查了代码,因为这是一个模式,使用Shadowbox,我们将此表单作为iFrame加载,而且垫片没有在加载到模式的页面标题中声明…因此没有HTML5识别。谢谢。你刚刚救了我一天!
<script>
document.createElement('header');
document.createElement('hgroup');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
</script>