HTML5 声明兼容IE的写法
来源:互联网 发布:淘宝教育怎么入驻 编辑:程序博客网 时间:2024/05/19 19:59
HTML5 声明兼容IE的写法
<!DOCTYPE html>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<![endif]-->
<!--[if IE 7]>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<![endif]-->
<!--[if IE 6]>
<meta http-equiv="X-UA-Compatible" content="IE=6" />
<![endif]-->
关于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" >
为首选。
0 0
- HTML5 声明兼容IE的写法
- HTML5 声明兼容IE的写法
- HTML5 声明兼容IE的写法
- ie 的兼容写法
- 网页使用HTML5代码需兼容IE的写法
- 兼容ie的标签写法
- 兼容ie的分页写法
- 兼容IE的CSS写法
- html5与ie的兼容
- IE和火狐兼容的AJAX写法
- JS_兼容IE和FF的写法
- css_兼容IE和FF的写法
- IE和火狐兼容的AJAX写法
- IE、FF的JS兼容写法
- HTML 5兼容IE的写法
- HTML 5兼容IE的写法
- 简单兼容ie的css写法
- css三角形的IE兼容写法
- Android多线程断点下载文件
- Longest Substring Without Repeating Characters
- Leetcode - Add Binary -Jan 30, 2015
- poj 2160 Box 模拟
- DevCon 命令行实用工具可替代设备管理器
- HTML5 声明兼容IE的写法
- 养成定时更新内容的好习惯,提高搜索引擎时效性收录
- lv官方網 wqdx axsr jguq
- 最大子列和问题
- Two Sum Closest to K
- django提交表单提示"You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SL
- 403-In general, this can occur when there is a genuine Cross Site Request Forgery, or whe
- 我们可以推测矩阵乘法最优解的时间复杂度么?
- 自制CPU一开山篇