本文介绍了CSS文件未加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,此html页面将不会加载css文件,并且在Mac上的ff3.6.6中显示为乱码,在Safari中可以正常显示。

For some reason this html page will not load the css file AND displays as gibberish in ff3.6.6 on mac, fine in Safari.http://www.mainstayprojects.com/teardrop.html

同一代码在另一页上也可以正常工作:
www.mainstayprojects.com /

The same code works fine on another page:www.mainstayprojects.com/

CSS文件正确,并且所有html和CSS都经过验证。我不知道下一步该怎么做!?

The path to the css file is correct and all the html and css validates. I'm at a loss as to what to try next!?

帮助!

推荐答案

HTML文档被编码为UTF-16,但是服务器声称它是ISO-8859-1,而CSS似乎也是ISO-8859-1,但是服务器没有什么可说的

The HTML document is encoded as UTF-16 but the server claims it is ISO-8859-1, meanwhile the CSS appears to be ISO-8859-1 also, but the server has nothing to say about the encoding it is using.

要解决此问题:


  1. 选择一种编码(UTF -8是一个不错的选择,但请参见)

  2. 配置您的编辑器以保存在其中()

  3. 配置您的服务器以在内容类型标头中提及它()

  1. Pick an encoding (UTF-8 is a good choice but see http://www.joelonsoftware.com/articles/Unicode.html )
  2. Configure your editor to save in it ( http://www.w3.org/International/questions/qa-setting-encoding-in-applications )
  3. Configure your server to mention it in the content-type header ( http://www.w3.org/International/O-HTTP-charset )

这篇关于CSS文件未加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 14:44