简体   繁体   English

IE8开发人员工具缺少一些样式

[英]IE8 developer tools missing some styles

I'm having some problems with some CSS properties in IE8. 我在IE8中遇到一些CSS属性的问题。

I've tested my site in IE7, Chrome and Firefox and they work fine but IE8 is having some layout issues. 我已经在IE7,Chrome和Firefox中测试了我的网站,它们运行良好,但IE8有一些布局问题。

I inspect the developer tool option on ie8 and I've noticed that some of the properties I set in CSS are being ignored by ie8. 我检查了ie8上的开发人员工具选项,我注意到我在CSS中设置的一些属性被ie8忽略了。 For example: 例如:

    #header
{
 position: relative;
 padding: 20px;
 height: 100px;
 background:url(header.png);

}

In this header IE8 ignored the height property: If I inspect the element in developer tools it is missing that property and it's crushed into another line: 在这个标题中,IE8忽略了height属性:如果我检查开发人员工具中的元素,那么它会丢失该属性,并且它被压缩到另一行:

background:url;HEIGHT: 100PX

The same thing happens for floats too: 浮子也会发生同样的事情:

#logon
{
float: left;
text-align:right;
width:20%;
height: 40px;
padding-left: 0px;
padding-right:7px;
border:0;
margin:0;
background: url(navgradient.gif);
}

This ignores the float value: 这会忽略浮点值:

background: url(navgradient.gif); FLOAT:left;

What is happening here and how can I fix it? 这里发生了什么,我该如何解决?

I've seen this too. 我也见过这个。 Some styles are shown on the same line, happens to me with "filter" lines. 有些样式显示在同一行,在我看来有“过滤”行。

The HTML renders in IE correctly, but if you try to toggle that CSS line on/off, it affects both properties. HTML正确呈现在IE中,但如果您尝试打开/关闭该CSS行,则会影响这两个属性。 So unchecking "filter: alpha(opacity=25); BOTTOM: 10px" in dev tools disables both the "filter" and "bottom" CSS rules. 因此,在开发工具中取消选中“filter:alpha(opacity = 25); BOTTOM:10px”会禁用“过滤器”和“底部”CSS规则。

So it seems like a bug in dev tools' parser, but not the IE rendering engine. 所以它似乎是开发工具解析器中的一个错误,但不是IE渲染引擎。 It's crazy how this still isn't fixed. 这仍然是不固定的,这很疯狂。

Seems like a parse error, or similar. 看起来像解析错误或类似错误。 Try putting quotes around the image names; 尝试在图像名称周围加上引号;

background: url('navgradient.gif');

我已经看到如果样式表包含filter属性会发生这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM