为什么ie7始终处于Quirks模式? [英] Why is ie7 always in Quirks mode?

查看:82
本文介绍了为什么ie7始终处于Quirks模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我使用的DOCTYPE和XML声明:

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">

但是IE7始终会进入怪癖模式...

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

有人对为什么有任何想法吗?

Does anyone have any idea as to why?

预先感谢!

推荐答案

如果除了XML prolog 之外的DOCTYPE 之前还有其他内容,那么您将在IE7中触发怪癖模式。这包括空格和注释。

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.

XML Prolog仅会触发IE6中的怪癖模式。

这篇关于为什么ie7始终处于Quirks模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆