IE9忽略某些页面的CSS? [英] IE9 ignoring CSS for certain pages?

查看:90
本文介绍了IE9忽略某些页面的CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有不同的网站放送,基本上跑相同的代码。一个页面正确显示,而另一个页面似乎没有可用的CSS。

I have different sites being served up, essentially running off the same code. One page renders correctly, while the other appears to have no CSS available.

当我打开破碎的页面的IE9开发人员控制台,我看到:

When I bring up the IE9 developer console for the broken page, I see:

SEC7113:由于mime类型不匹配而忽略CSS

使用fiddler,同样的CSS是一个页面,并且两个网站都有一个元标记:

Using fiddler, the same CSS is served to both sites, and both sites have a the metatag:

< meta http-equiv =X-UA-Compatiblecontent = IE = EmulateIE8/>

我知道IE9还在测试中,但我想知道为什么这是一个问题我的网站。

I know IE9 is still in beta, but I am trying to figure out why this is a problem with my site.

推荐答案

这看起来不像IE模拟的东西 - 听起来像响应中的CONTENT- TYPE不是text / css。看起来像IE9强制要求包含CSS的文件实际上被标记为这样。

This doesn't look like an IE emulation thing - it sounds like the CONTENT-TYPE in the response isn't "text/css". It looks like IE9 enforces that files that are expected to contain CSS are actually marked as such.

只是出于兴趣,是以任何方式处理的CSS页面?即它们是由ASPX页面呈现,以允许您注入CSS?如果是这样,那么你可能想要确保你的页面声明在顶部包括ContentType声明,例如:

Just out of interest, are the CSS pages processed in any way? i.e. are they rendered by an ASPX page to allow you to inject CSS? If that's the case then you may want to make sure your page declaration at the top includes the ContentType declaration, e.g.:

<%@ Page Language="C#" ContentType="text/css" %>

这篇关于IE9忽略某些页面的CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆