0

H5BP作品以及在Internet Explorer中,互聯網 此響應例如資源管理器  8和Internet Explorer的,但是當我使用H5BP在我自己的項目,它不能在互聯網上工作  Explorer   7只。我也嘗試省略H5BP,並使用純html5shiv + Respond.js(也與selectivzr.js),但我遇到相同的問題(它不適用於Internet   Explorer   7)。我看不到任何JavaScript /控制檯錯誤。Respond.js不在是Internet Explorer 7,但H5BP例如工作

試圖CSS3-mediaqueries.js我發現在互聯網上 瀏覽器  7,上網 瀏覽器  8和Internet Explorer的效果很好,但我注意到,過渡(讀取媒體查詢)被延遲差不多一秒鐘,所以我不想用它。 Respond.js要快得多。

我已閱讀the respond.js page上的「跨域/ CDN問題」,我的測試項目位於子域根目錄(例如,子域[dot] mydomain [dot] tld /),所以如果這是問題爲什麼它在互聯網上運作良好 資源管理器  8和互聯網 資源管理器  9但不在互聯網 資源管理器  7?

在Internet Explorer中不工作意味着該列沒有在Internet Explorer的僅崩潰,媒體查詢是不讀。

我已經下載了html5shiv.js和respond.js的initializr響應演示和它運作良好,對我的子域,因此「跨域/ CDN的問題」是沒有問題的:/

在Internet  資源管理器,我已禁用「Enable protected mode」,現在它可以正常工作。 但是,爲什麼在線示例(H5BP和initializr)儘管啓用了此安全設置,仍能正常工作?

這是最後的測試我做的HEAD:

<!DOCTYPE html> 
<html dir="ltr" lang="it"> 
<head> 
    <link href="http://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,400italic,700italic,300italic,300&subset=latin,latin-ext,greek-ext,greek" rel="stylesheet" type="text/css" /> 
    <meta charset="<?php echo $charset; ?>" /> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
    <title><?php echo $cur_title; ?></title> 
    <meta name="<?php echo $cur_desc; ?>" /> 
    <link rel="canonical" href="<?php echo $cur_canonical; ?>" /> 
    <meta name="author" content="<?php echo $author; ?>" /> 
    <base href="<?php echo $cur_base; ?>" /> 
    <meta http-equiv="imagetoolbar" content="no" /> 
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="apple-touch-icon-144x144.png" /> 
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114.png" /> 
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72.png" /> 
    <link rel="apple-touch-icon-precomposed" sizes="57x57" href="apple-touch-icon-57x57.png" /> 
    <link rel="shortcut icon" href="apple-touch-icon-57x57.png" /> 
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> 
    <link rel="icon" href="favicon.ico" type="image/x-icon" /> 
    <meta name="viewport" content="width=device-width" /> 

    <!--[if lt IE 9]> 
     <script type="text/javascript" src="js/respond.min.js"></script> 
    <![endif]--> 

    <!--[if lt IE 9]> 
     <script type="text/javascript" src="js/html5shiv.js"></script> 
    <![endif]--> 

    <script type="text/javascript" src="js/jquery-1.8.0.min.js"></script> 

    <!--[if (gte IE 6)&(lte IE 8)]> 
     <script type="text/javascript" src="selectivizr.js"></script> 
    <![endif]--> 

    <link rel="stylesheet" type="text/css" href="css/normalize.min.css" /> 
    <link rel="stylesheet" type="text/css" href="css/style.css" /> 
    <script type="text/javascript" src="js/jquery.easing-1.3.pack.js"></script> 
    <script type="text/javascript" src="js/jquery.mousewheel-3.0.4.pack.js"></script> 
    <script type="text/javascript" src="js/jquery.hoverIntent.minified.js"></script> 
    <script type="text/javascript" src="js/jquery.quicksearch.js"></script> 
    <script type="text/javascript">var base = '<?php echo $base; ?>';</script> 
    <script type="text/javascript">var isMobile = <?php echo $isMobile; ?>;</script> 
    <script type="text/javascript" src="js/common.js<?php echo '?'.time(); ?>"></script> 
</head> 
+0

「不工作」是什麼意思?這些列不會崩潰? – jmbertucci 2013-05-01 13:40:52

+0

確切地說,IE7測試IE7(即ie7 /標準ie7)不能正常工作。改用css3-mediaqueries.js。在IE中, – benzo 2013-05-01 13:48:14

+0

,我不喜歡「啓用保護模式」,現在它工作。但是,爲什麼在啓用安全設置的情況下在線示例(H5BP和initializr)有效? – benzo 2013-05-01 23:28:34

回答

3

解決

在IE7的問題是標籤 「基地」,你可以在this看到例如,我添加到響應標籤「base」的H5BP模板,現在不再適用於IE7。 所以這就是爲什麼它不能在IE7上工作。

Respond.js GitHub issues #1

Respond.js GitHub的問題#2(https://開頭的github [點] com/scottjehl /回覆/問題/ 137)

甲GitHub的用戶與解釋和修正(測試頁面http ://網頁設計[dot] web3.lu/mediaqueries_polyfill.html)

0

所有人都想知道爲什麼HPBP只是在「不應該」的情況下工作的一件小事情,因爲缺乏更好的術語。

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

它使得瀏覽器使用最好的渲染引擎,即IE10。如果你使用IE說10,並且簡單地改變開發工具中的渲染模式,那麼只需發表評論即可進行測試。