Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Respond.js在Internet Explorer 7中不工作,但H5BP示例可以工作_Html_Internet Explorer 7_Responsive Design_Base_Respond.js - Fatal编程技术网

Html Respond.js在Internet Explorer 7中不工作,但H5BP示例可以工作

Html Respond.js在Internet Explorer 7中不工作,但H5BP示例可以工作,html,internet-explorer-7,responsive-design,base,respond.js,Html,Internet Explorer 7,Responsive Design,Base,Respond.js,来自的这个响应性示例在InternetExplorer7、InternetExplorer8和InternetExplorer9中运行良好,但当我在自己的项目中使用H5BP时,它仅在InternetExplorer7中不起作用。我也尝试过省略H5BP并使用纯html5shiv+Respond.js(也使用selectivzr.js),但我遇到了同样的问题(它在InternetExplorer7中不起作用)。我看不到任何JavaScript/控制台错误 尝试css3-mediaqueries.js

来自的这个响应性示例在InternetExplorer7、InternetExplorer8和InternetExplorer9中运行良好,但当我在自己的项目中使用H5BP时,它仅在InternetExplorer7中不起作用。我也尝试过省略H5BP并使用纯html5shiv+Respond.js(也使用selectivzr.js),但我遇到了同样的问题(它在InternetExplorer7中不起作用)。我看不到任何JavaScript/控制台错误

尝试css3-mediaqueries.js,我发现它在InternetExplorer7、InternetExplorer8和InternetExplorer9上运行良好,但我注意到转换(读取媒体查询)延迟了将近一秒钟,所以我不想使用它。Respond.js要快得多

我已经阅读了上的“跨域/CDN问题”,并且我的测试项目位于子域根目录中(例如,子域[dot]mydomain[dot]tld/),因此,如果这是问题所在,为什么它在InternetExplorer8和InternetExplorer9上运行良好,但在InternetExplorer7中运行不正常

不在InternetExplorer7中工作意味着列不会仅在InternetExplorer7中折叠,不会读取媒体查询

我已经下载了带有html5shiv.js和respond.js的Initializer responsive演示,它在我的子域上运行良好,因此“跨域/CDN问题”不是问题:/

在InternetExplorer中,我禁用了“”,现在它可以工作了但是,尽管启用了此安全设置,为什么联机示例(H5BP和Initializer)仍然有效?

这是我最后一次测试的开头:

<!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>

;

已解决

IE7中的问题是标签“base”,正如您在示例中看到的,我在H5BP模板中添加了标签“base”,现在在IE7上不再起作用。 这就是为什么它在IE7上不起作用

Respond.js GitHub问题#2(https://github[dot]com/scottjehl/Respond/issues/137)


GitHub用户的测试页面,包括解释和修复(http://webdesign[dot]web3.lu/mediaqueries\u polyfill.html)

已解决

IE7中的问题是标签“base”,正如您在示例中看到的,我在H5BP模板中添加了标签“base”,现在在IE7上不再起作用。 这就是为什么它在IE7上不起作用

Respond.js GitHub问题#2(https://github[dot]com/scottjehl/Respond/issues/137)


GitHub用户的测试页面,包括解释和修复(http://webdesign[dot]web3.lu/mediaqueries\u polyfill.html)

对于所有想知道为什么HPBP在“不应该”的情况下工作的人来说,这只是一件小事。。因为没有更好的术语

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


它使浏览器使用可用的最佳渲染引擎,即IE10。如果您正在使用IE,比如说10,只需在开发工具中更改渲染模式,只需将其注释出来进行测试。

对于所有想知道为什么HPBP在“不应该”的情况下工作的人来说,这只是一件小事。。因为没有更好的术语

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


它使浏览器使用可用的最佳渲染引擎,即IE10。如果您使用的是IE,比如说10,只需在开发工具中更改渲染模式,只需将其注释出来进行测试。

什么是“不工作”的意思?这些列没有倒塌?确切地说,它不仅在用IE10测试的ie7中有效(ie7/标准ie7)。css3-mediaqueries.js可以工作。在IE中,我取消了“启用保护模式”,现在它可以工作了。但是为什么在线示例(H5BP和Initializer)尽管启用了此安全设置,但仍然有效?这是测试站点,如果您想进行检查,我将不胜感激。目前的情况是,css与respond.js演示中使用的相同,完全相同。我在IE10中得到了7种不同的bg颜色,作为IE7标准或怪癖模式运行。你的电脑会不会有些奇怪?你有没有试过不同的电脑,或者在类似BrowserStack.com的网站上测试过?什么叫“不工作”?这些列没有倒塌?确切地说,它不仅在用IE10测试的ie7中有效(ie7/标准ie7)。css3-mediaqueries.js可以工作。在IE中,我取消了“启用保护模式”,现在它可以工作了。但是为什么在线示例(H5BP和Initializer)尽管启用了此安全设置,但仍然有效?这是测试站点,如果您想进行检查,我将不胜感激。目前的情况是,css与respond.js演示中使用的相同,完全相同。我在IE10中得到了7种不同的bg颜色,作为IE7标准或怪癖模式运行。你的电脑会不会有些奇怪?你有没有试过不同的电脑,或者在类似BrowserStack.com的网站上测试过?