細心的朋友會發現下面的html代碼中多了一個<細心的朋友會發現下面的html代碼中多了一個<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />標籤!
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="robots" content="all" />
<meta name="googlebot" content="all" />
<meta name="description" content="提供最新的asp源碼,php源碼,.net源碼,flash源碼,網站源碼,網頁源碼,模板,軟件下載" />
<meta name="keywords" content="asp源碼,php源碼,.net源碼,flash源碼,網站源碼,網頁源碼,模板,軟件" />
<title>源碼下載網 - 提供最新免費網站源碼下載</title>
<META name="copyright" content="www.downhtml.com" />php
那這個標籤是什麼意思呢?讓我來看下msdn上的說明:
In IE8 Beta 1, that option is the 「IE=7」 X-UA-Compatible tag, which instructs IE8 to display content in IE7 Standards mode. However, the scenario this doesn’t address is when IE=7 is applied as an HTTP header to a site that contains Quirks mode pages. The IE=7 HTTP header will force all pages – both Quirks and Standards – to display in IE7 Standards mode. Developers using this header while updating their sites would then have to add the 「IE=5」 <META> tag to each page they want to keep in Quirks mode. This logic is fine for many websites. However, if a site has lots of Quirks mode pages, or for the case where pages with frames host a mix of Strict and Quirks mode content – as brought to light by IE8 Beta 1 user feedback – the compatibility opt-out adds a bit more work than we intended.html
X-UA-Compatible是針對ie8新加的一個設置,對於ie8以外的瀏覽器是不識別的,這個區別與content="IE=7"在不管頁面是否包含<!DOCTYPE>指令,都像是使用了 Windows Internet Explorer 7的標準模式。而content="IE=EmulateIE7"模式遵循<!DOCTYPE>指令。對於多數網站來講,它是首選的兼容性模式。web
目前IE8尚在測試版中,因此爲了不製做出的頁面在IE8下面出現錯誤,建議直接將IE8使用IE7進行渲染。也就是直接在頁面的header的meta標籤中加入以下代碼:
<meta http-equiv="X-UA-Compatible" content="IE=7" />
這樣咱們才能使得頁面在IE8裏面表現正常! http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />標籤!
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="robots" content="all" />
<meta name="googlebot" content="all" />
<meta name="description" content="提供最新的asp源碼,php源碼,.net源碼,flash源碼,網站源碼,網頁源碼,模板,軟件下載" />
<meta name="keywords" content="asp源碼,php源碼,.net源碼,flash源碼,網站源碼,網頁源碼,模板,軟件" />
<title>源碼下載網 - 提供最新免費網站源碼下載</title>
<META name="copyright" content="Downhtml.com" />瀏覽器
那這個標籤是什麼意思呢?讓我來看下msdn上的說明:app
In IE8 Beta 1, that option is the 「IE=7」 X-UA-Compatible tag, which instructs IE8 to display content in IE7 Standards mode. However, the scenario this doesn’t address is when IE=7 is applied as an HTTP header to a site that contains Quirks mode pages. The IE=7 HTTP header will force all pages – both Quirks and Standards – to display in IE7 Standards mode. Developers using this header while updating their sites would then have to add the 「IE=5」 tag to each page they want to keep in Quirks mode. This logic is fine for many websites. However, if a site has lots of Quirks mode pages, or for the case where pages with frames host a mix of Strict and Quirks mode content – as brought to light by IE8 Beta 1 user feedback – the compatibility opt-out adds a bit more work than we intended.測試
X-UA-Compatible是針對ie8新加的一個設置,對於ie8以外的瀏覽器是不識別的,這個區別與content="IE=7"在不管頁面是否包含指令,都像是使用了 Windows Internet Explorer 7的標準模式。而content="IE=EmulateIE7"模式遵循指令。對於多數網站來講,它是首選的兼容性模式。網站
目前IE8尚在測試版中,因此爲了不製做出的頁面在IE8下面出現錯誤,建議直接將IE8使用IE7進行渲染。也就是直接在頁面的header的meta標籤中加入以下代碼:
<meta http-equiv="X-UA-Compatible" content="IE=7" />
這樣咱們才能使得頁面在IE8裏面表現正常! http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />標籤!ui
文章來源 源碼下載網 ww.downhtml.com 轉載請註明出處。this