jquery - Selectivizr IE8 白屏死机

标签 jquery internet-explorer-8 requirejs respond.js selectivizr

我正在使用 Respond.js 和 Selectivizr 来支持 IE8 媒体查询和 CSS3 属性。 不幸的是,它导致了这个著名的白屏死机......

删除 selectivizr 脚本后,它工作正常。 我搜索了 stackoverflow,发现了一些对我不起作用的解决方法。

我尝试过的:

  • 在 Respond.js 之前加载 Selectivizr
  • 将两个库更新到最新版本
  • 删除其他库/插件
  • <meta http-equiv="X-UA-Compatible" content="IE=8" />

我正在使用什么:

  • jQuery
  • Respond.js
  • 选择性
  • 现代化
  • Require.js

HTML:

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="lt-ie9 lt-ie8 lt-ie7 no-js"> <![endif]-->
<!--[if IE 7]>         <html class="lt-ie9 lt-ie8 no-js"> <![endif]-->
<!--[if IE 8]>         <html class="lt-ie9 no-js"> <![endif]-->
<!--[if IE 9]>         <html class="ie9 no-js"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js"> <!--<![endif]-->

<head>
    <title><?php echo $portal_name . " " . $pageTitle; ?></title>
    <meta charset="utf-8">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="apple-touch-icon" href="/images/global/apple-touch-icons/<?php echo $portal; ?>-touch-icon-iphone.png" />
    <link rel="apple-touch-icon" sizes="76x76" href="/images/global/apple-touch-icons/<?php echo $portal; ?>-touch-icon-ipad.png" />
    <link rel="apple-touch-icon" sizes="120x120" href="/images/global/apple-touch-icons/<?php echo $portal; ?>-touch-icon-iphone-retina.png" />
    <link rel="apple-touch-icon" sizes="152x152" href="/images/global/apple-touch-icons/<?php echo $portal; ?>-touch-icon-ipad-retina.png" />
    <link rel="stylesheet" href="/css/<?php echo $portal; ?>.css">
    <script src="/js/vendor/modernizr.custom.min.js"></script>
    <script src="/js/vendor/jquery-1.9.1.min.js"></script>
    <script type="text/javascript">
    // add specific class to html when windows
    if (navigator.appVersion.indexOf("Win")!=-1){
        $('html').addClass('win');
    }

    // add specific class to html when chrome
    if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1){
        $('html').addClass('chrome');
    }
    </script>
    <!--[if lt IE 9]>
        <script type="text/javascript" src="/js/plugins/jquery.selectivizr.min.js"></script>
        <script type="text/javascript" src="/js/vendor/respond.min.js"></script>
    <![endif]-->        
    <script async data-main="/js/app" src="/js/vendor/require.min.js"></script>
</head>

有什么建议可以解决这个问题吗?

最佳答案

我没有找到准确的答案,但 Selectivizr 似乎无法与 Respond.js 结合使用。删除 Selectivizr 为我解决了这个问题..

关于jquery - Selectivizr IE8 白屏死机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19864114/

相关文章:

javascript - $.Deferred().promise 与 $.get().promise

javascript - jQuery 对话框未打开,并且似乎没有错误

requirejs - RequireJS 模块是否有 "inherit"依赖项?

Javascript - 带 _blank 的位置 href

jquery - 扩展的 div-content 压低其他 div

internet-explorer - IE8 只打印网页的第 1 页

javascript - IE8 不支持 function.bind()。使其专门用于 IE8 浏览器?或者保持通用

html - IE11 显示 html 页面的问题

javascript - highcharts-more + requirejs, Highcharts 未定义

javascript - 如果我将新版本的 javascript 文件上传到 Amazon S3,是否会出现浏览器缓存问题?