我有一个网站在Chrome,Firefox,Safari等上运行得非常好.但是,CSS不会加载到Internet Explorer(任何版本)以及MS Edge浏览器中.
SEC7113: CSS was ignored due to mime type mismatch File: application-2015-2a0565839ee60a029c49fc918e3625e9.css SEC7113: CSS was ignored due to mime type mismatch File: CustomCss.css SEC7113: CSS was ignored due to mime type mismatch File: print.css
我已经检查了代码,这就是它在< head>中的含义.
// ASP.NET MVC code - .cshtml layout file <link href='@Url.Content("/Content/application-2015-2a0565839ee60a029c49fc918e3625e9.css")' media="screen" rel="stylesheet" type="text/css"/> <link href='@Url.Content("/Content/CustomCss.css")' media="screen" rel="stylesheet" type="text/css"/> <link href='@Url.Content("/Content/2015/print.css")' media="print" rel="stylesheet" type="text/css"/>
我已经检查过IE Developer Tools,并且css确实在IE中返回了错误的MIME类型(显示为空白)而不是Chrome或Firefox中的样式表或text / css:
如何让IE了解Mime类型并让它正确加载它.
任何帮助都非常感谢.
编辑
正如所建议的那样,还检查了HKEY_CLASSES_ROOT中.css的注册表值,这似乎没问题,如下所示:
此外,确保没有程序与CSS关联打开.