• ie9下网页设计兼容模式


    个人实践使用:ie9下使用低版本ie兼容模式,在网站第一个页面的<head>标签后使用<meta http-equiv="X-UA-Compatible" content="IE=8" />,位置一定要放对。否则无效。

    或者

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

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE6"/>---这个是默认使用ie7

    关于X-UA-Compatible

    目前绝大多数网站都用

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

    来作为IE8的兼容方法,虽然微软将IE向标准迈进了一大步,而事实上IE8还存在一系列渲染的奇怪现象是不争的事实。

    谁让IE6那么多呢,或许2014年以后我们可以有更多的时间去关心IE8,而不是IE6或者IE7。

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

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

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

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

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

    其中最后一行是永远以最新的IE版本模式来显示网页的。

    另外加上

    <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://www.huoyue.org/x-ua-compatible

    IE9应用低版本IE模式(转自http://tech.liuj.in/?p=34)

    最近基于GWT2.2.0 开发的产品在IE9下报出了bug,临时用启动选择IE8标准模式解决的。换GWT2.4.o就解决了,不过还是把应用版本模式的方法写在这里。

    设置X-UA-Compatible的meta header理所应当能启动模式,但是注意这里,此段header前,最好不要加除了title和其他meta外的任何标签和注释

    当然IE的测试也很恐怖,最好close all the windows才靠谱。

    官方文档大概这样写的

    The X-UA-Compatible header is not case sensitive; however, it must appear in the header of the webpage (the HEAD section) before all other elements except for the title element and other meta elements.

    参考资料

    官方文档: http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx



    民间文章:http://www.swingworks.net/2011/08/x-ua-compatible_breaks_in_ie9/

    于是,如此这般

    <head>
      <title>Loading...</title>
      <meta http-equiv="X-UA-Compatible" content="IE=8" />
      <!--[if IE 7]>
      <meta http-equiv="X-UA-Compatible" content="IE=7" />
      <![endif]-->

    百度相关网址 : http://www.swingworks.net/2011/08/x-ua-compatible_breaks_in_ie9/

    http://www.iefans.net/ie9-x-ua-compatible/

    http://www.imququ.com/post/browser-mode-and-document-mode-in-ie.html

  • 相关阅读:
    Java基础——Instanceof 运算符
    算法——八皇后问题(eight queen puzzle)之回溯法求解
    浅析数据结构
    react給變量賦值并列元素
    如何使用npm构建一个react demo项目
    Java面试题 静态代码块 构造代码块 构造方法 的执行顺序
    Mysql 反向解析 导致远程访问慢
    Django admin管理工具
    Django-Ajax(85)
    jQuery快速入门
  • 原文地址:https://www.cnblogs.com/legend_sun/p/3367257.html
Copyright © 2020-2023  润新知