SA
我知道这个问题已有多个答案,但没有一个对我有用,因为我有点奇怪。
基本上我有几页说:
index.html
contacts.html
find.html
header.html // main.css files contains styling for this header file which is dynamically loaded into different pages.
问题在于,当我将头文件加载到index.html
或contacts.html
时,它加载正常,但是当我在find.html
加载时,它会弹出浏览器控制台错误说:< / p>
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead[Learn More] JquerySock.js:1
The stylesheet http://localhost:20012/Duck/main.css was not loaded because its MIME type, “text/html”, is not “text/css”. search
The stylesheet http://localhost:20012/Duck/CSS/search.css was not loaded because its MIME type, “text/html”, is not “text/css”. search
The stylesheet http://localhost:20012/Duck/mainelements/aside.css was not loaded because its MIME type, “text/html”, is not “text/css”.
请求标题content-type
恰好是text/css
,但响应出现时text/html
并不知道原因。
仅供参考:我正在使用Debian(Jessie)。 Firefox ESR v52.4.0
答案 0 :(得分:0)
看起来您的代码需要登录才能访问CSS样式表,并返回HTML登录页面而不是CSS。
此处'样式'是包含css的文件夹。
<location path="~/Styles">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>