- Visual Studio提示“无法启动IIS Express Web服务器”的解决方法
- 单页面具体如何来进行SEO优化?
- “An exception has been raised that is likely due to a transient failure. Consider enabling transient
- VMware虚拟机安装Windows Server 2008 R2
- Nuxt3项目目录结构
- Server Error in “/ ” Application
- 小程序 For developer:Do not set same key “[object Object]“ in wx:key
- 从fckeditor升级到ckeditor后上传图片路径问题的解决
- 移动控件的自定义属性
- AutoMapper的自定义映射
邮箱:
手机:15383239821
使用X-UA-Compatible来设置IE8兼容模式
你对IE兼容设置的方法是否熟悉,这里和大家分享一下使用X-UA-Compatible来设置IE8兼容模式,X-UA-Compatible是针对IE8新加的一个设置,但是对于IE8之外的浏览器是不识别的。
使用X-UA-Compatible来设置IE8兼容模式
X-UA-Compatible是针对IE8新加的一个设置,对于IE8之外的浏览器是不识别的,这个区别与content=”IE=7″在无论页面是否包含<!DOCTYPE>指令,都像是使用了WindowsInternetExplorer7的标准模式。而content=”IE=EmulateIE7″模式遵循<!DOCTYPE>指令。对于多数网站来说,它是首选的兼容性模式。
目前IE8尚在测试版中,所以为了避免制作出的页面在IE8下面出现错误,建议直接将IE8使用IE7进行渲染。也就是直接在页面的header的meta标签中加入如下代码:
1.<metahttp-equiv=”X-UA-Compatible”content=”IE=5″/>
像是使用了WindowsInternetExplorer7的Quirks模式,这与WindowsInternetExplorer5显示内容的方式很相似。
2.<metahttp-equiv=”X-UA-Compatible”content=”IE=7″/>
无论页面是否包含<!DOCTYPE>指令,都像是使用了WindowsInternetExplorer7的标准模式。
3.<metahttp-equiv=”X-UA-Compatible”content=”IE=8″/>
4.<metahttp-equiv=”X-UA-Compatible”content=”edge”/>
Edge模式通知WindowsInternetExplorer以最高级别的可用模式显示内容,这实际上破坏了“锁定”模式。
5.<metahttp-equiv=”X-UA-Compatible”content=”IE=EmulateIE7″/>
EmulateIE7模式通知WindowsInternetExplorer使用<!DOCTYPE>指令确定如何呈现内容。标准模式指令以WindowsInternetExplorer7标准模式显示,而Quirks模式指令以IE5模式显示。与IE7模式不同,EmulateIE7模式遵循<!DOCTYPE>指令。对于多数网站来说,它是首选的兼容性模式。
附:今天又看到一篇译文说X-UA-Compatible不加时默认被锁定为IE7版本执行。这样我们才能使得页面在IE8里面表现正常!
- 上一篇:CSS布局中position属性用法
- 下一篇:深入探究IE8和IE7的24个区别
-
2012-12-02行业网站怎样确定关键词
-
2012-06-305大seo细节
-
2023-08-27thinkphp中的$this是什么意思?
-
2013-06-08js笔记之Math random()、ceil()、floor()、round()
-
2013-06-11VS的“行尾不一致,要将行尾标准化吗”问题
-
2023-03-23apache的.htaccess规则
