internet-explorer-8 - <!DOCTYPE HTML> 用于 IE

标签 internet-explorer-8 doctype

当我包含 <!DOCTYPE HTML> 时对于 IE v8,对话框以相同的大小打开,但页面的布局受到干扰
有什么建议如何防止网页布局发生变化?

最佳答案

如果您没有 doctype 标签,页面将以 Quirks 模式呈现。这意味着它试图与旧版本的浏览器兼容,对于 IE,这意味着它使用 non-standard box model .

当您添加 doctype 标签时,页面将在标准合规模式下呈现,浏览器会尝试尽可能地遵循 Web 标准。

如果您在 IE 中为 Quirks 模式设计了您的页面,那么您很可能已经利用了 IE 中的一些呈现错误。这意味着它不会按照您在任何其他浏览器或标准合规模式中的预期呈现。

关于internet-explorer-8 - &lt;!DOCTYPE HTML> 用于 IE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6439463/

相关文章:

xhtml - Website W3C validator 显示 "Mismatch between Public and System identifiers in the DOCTYPE declaration",怎么办?

php - 如何防止文档类型被添加到 HTML 中?

css - &lt;!DOCTYPE html> 导致页眉和页脚中断

html - 下拉导航选项卡不适用于文档类型声明

javascript - jQuery Click 绑定(bind)在 IE8 中不触发

html - 推特 Bootstrap : Most IE related issue happen in local server

email - 生成 HTML 邮件时使用什么文档类型

javascript - IE8 中的 Colorbox 出现摇晃

css - 表格布局 : fixed - IE8 delay render problem with dynamic content

html - 为什么内联 "background-image"样式在 Chrome 10 和 Internet Explorer 8 中不起作用?