zoukankan      html  css  js  c++  java
  • X-UA-Compatible IE 浏览器默认文档模式设置

    制作网页的时候,IE8浏览器浏览页面的时候,有时候文档模式默认是IE7,导致IE8兼容性不是非常好。出现IE7应该出现的模式。

    解决的方法例如以下:

    在X-UA-Compatible中可用的方法有:

    <meta http-equiv="X-UA-Compatible" content="IE=5" >

    <meta http-equiv="X-UA-Compatible" content="IE=7" >

    IE5和IE7如今已经不用了。

    <meta http-equiv="X-UA-Compatible" content="IE=8" >

    <meta http-equiv="X-UA-Compatible" content="IE=edge" >

    当中最后一行是Edge 模式。通知 Windows Internet Explorer 以最高级别的可用模式显示内容。

    眼下绝大多数站点都用<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >来作为IE8的兼容方法。

    为了避免制作出的页面在IE8以下出现错误,建议直接将IE8使用IE7进行渲染。

    也就是直接在页面的header的meta标签中增加例如以下代码:

    <meta http-equiv="X-UA-Compatible" content="IE=7" />

    另外加上

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >

    而使用,Emulate模式后则更重视<!DOCTYPE>,

    所以眼下来说还是以<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >为首选。


    百度博客搬家,博客源地址:http://hi.baidu.com/confidence68/item/00a435f1f53d937f3d198b01

  • 相关阅读:
    【LeetCode】链表 linked list(共34题)
    Construct Binary Tree from Preorder and Inorder Traversal<leetcode>
    Triangle <leetcode>
    Jump Game <leetcode>
    C++学习笔记 <const限定词>
    Search for a Range <leetcode>
    Subsets <leetcode>
    各种排序算法总结
    Unique Paths II <leetcode>
    C++学习笔记 <hash_map> <散列映射>
  • 原文地址:https://www.cnblogs.com/yxwkf/p/5178960.html
Copyright © 2011-2022 走看看