zoukankan      html  css  js  c++  java
  • 去掉浏览器的兼容模式提醒 |||

    X-UA-Compatible 是针对 IE8 版本的一个特殊文件头标记,用于为 IE8 指定不同的页面渲染模式。由于当下 IE6 和 IE7 使用率依然较高,综合考虑,启用 IE8 版本的 X-UA-Compatible 兼容模式显得相当重要。

    各种兼容模式代码示例如下:
    <meta http-equiv="X-UA-Compatible" content="IE=5" />
    像是使用了 Windows Internet Explorer 7 的 Quirks 模式,这与 Windows Internet Explorer 5 显示内容的方式很相似。
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    无论页面是否包含
    <!DOCTYPE> 指令,均使用 Windows Internet Explorer 7 的标准渲染模式。
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    开启 IE8 的标准渲染模式,但由于本身 X-UA-Compatible 文件头仅支持 IE8 以上版本,因此等同于冗余代码。
    <meta http-equiv="X-UA-Compatible" content="edge" />
    Edge 模式通知 Windows Internet Explorer 以最高级别的可用模式显示内容,这实际上破坏了“锁定”模式。
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    EmulateIE7 模式通知 Windows Internet Explorer 使用
    <!DOCTYPE> 指令确定如何呈现内容。标准模式指令以Windows Internet Explorer 7 标准模式显示,而 Quirks 模式指令以 IE5 模式显示。与 IE7 模式不同,EmulateIE7 模式遵循 <!DOCTYPE> 指令。对于多数网站来说,它是首选的兼容性模式。
     

  • 相关阅读:
    Bootstrap学习笔记系列2-------Bootstrap简单表格处理
    Bootstrap学习笔记系列1-------Bootstrap网格系统
    前端代码规范
    Dev TreeList设置焦点失败解决方法
    las数据集加载las数据
    c# 文件另存为代码
    Dev 饼图
    ASP.NET MVC Json的序列化和反序列化
    服务器重启后导致访问ArcServer地图服务须登录
    jQuery回调函数
  • 原文地址:https://www.cnblogs.com/pipizhu/p/1951435.html
Copyright © 2011-2022 走看看