Why is ie7 always in Quirks mode?

冷暖自知 提交于 2019-12-23 07:48:22

问题


Here is the DOCTYPE and XML declaration that I am using:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

But still IE7 is always going to quirks mode...

Does anyone have any idea as to why?

Thanks in advance!


回答1:


If you have anything before the DOCTYPE apart from the XML prolog, then you will trigger quirks mode in IE7. This includes white space and comments.

The XML prolog will only trigger quirks mode in IE6.



来源:https://stackoverflow.com/questions/3527297/why-is-ie7-always-in-quirks-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!