CSS是不是从本地主机渲染 - 但只有在Chrome和IE [英] CSS isn't rendering from localhost - but only in Chrome and IE
问题描述
我已经验证了我所有的HTML和CSS,并没有错误,但不幸的是我的本地主机的只有被正确呈现在Firefox - 在Chrome和IE9他们只显示没有任何内容CSS。
I've validated all my HTML and CSS, and there are no errors, but unfortunately my localhost is only being rendered correctly in Firefox -- in Chrome and IE9 they only show the content without any CSS.
我看了在开发工具控制台,我发现了以下错误消息:
I've looked in the developer tools console and I've found the following error messages:
IE
SEC7113: CSS was ignored due to mime type mismatch
Chrome浏览器
Resource interpreted as Stylesheet but transferred with MIME type text/plain:
Firefox不作任何这些投诉,但是。
Firefox doesn't make any of these complaints, however.
什么引起这个错误?
推荐答案
啊哈!我张贴了这个问题,就在我发现这个问题:我在树中的错误的的.htaccess
文件上涨。它影响到所有的JS和CSS文件的处理。
Aha! Just after I posted this question I spotted the problem: I had an errant .htaccess
file higher up in the tree. It was affecting the handling of all JS and CSS files.
有时,它有助于在逻辑上写东西了! :)
Sometimes it helps to write things out logically! :)
这篇关于CSS是不是从本地主机渲染 - 但只有在Chrome和IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!