2011-09-08 101 views
2

我正在Apache 2.2中工作。我的本地主机打开了我的网页,但没有应用CSS,也没有加载背景图像。我不知道为什么。使用Chrome开发人员工具我收到以下警告:资源解释为样式表,但与MIME类型文本传输纯正的问题?

resource interpreted as stylesheet but transferred with mime type text plain 
resource interpreted as stylesheet but transferred with mime type text html 
resource interpreted as script but transferred with mime type text html 
GET http://www.xmweb.com/js/calendar/layout-3d.css 404 (Not Found) 
resource interpreted as Image but transferred with mime type text html 

我不明白这个问题。这是在httpd.conf文件中的问题吗?我试图添加.htaccess文件,但仍然遇到了同样的问题。请帮忙!

回答

1

如果看来你的浏览器无法加载CSS,你得到一个404(未找到),并用404消息的HTML页面。尝试直接通过浏览器加载http://www.xmweb.com/js/calendar/layout-3d.css并查看页面。

它可以帮助打开你的Web服务器的错误日志看看什么缺失。

1

我也有类似的问题,一个样式表,我解决了这个问题,加入这一行.htaccess文件:

AddType text/css .css 

我会尝试这一点,也做出相应的JavaScript和图像条目。

相关问题