DOCTYPE CSS问题 [英] DOCTYPE CSS problem
问题描述
当我添加
<!DOCTYPE html PUBLIC - // W3C // DTD XHTML 1.0 Transitional // EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
行到我的html文件的顶部,我的css规则在firefox中消失。我也看不到他们与萤火虫。
你对这个问题有什么想法吗? 制作确保这些文件是由服务器使用正确的MIME类型( text / css
)发送的。看看错误控制台(IIRC菜单应该是英文版的Tools / Error Console)。通常,如果文件以 .css
结尾,这应该会自动发生,但是仍然存在配置错误的服务器周围。如果您使用的是Apache Web服务器,您可以使用 .htaccess
文件进行更正,否则您需要获得支持。
详情: https://developer.mozilla.org/en/ incorrect_mime_type_for_css_files
When I added
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
line to the top of my html file, my css rules disappear in firefox. Also i can't see them with firebug.
Do you have any idea about this problem ?
Make sure that the files are sent by the server with the correct MIME type (text/css
). Have a look in the error console ( IIRC the menu should be Tools / Error Console in the English version).
Usually, if the file ends with .css
, this should happen automatically, however there are still badly configured servers around. If you are using a Apache web server, you may be able to correct this with a .htaccess
file, otherwise you'll need to ask your support.
Details: https://developer.mozilla.org/en/incorrect_mime_type_for_css_files
这篇关于DOCTYPE CSS问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!