Selectivizr IE8死亡白屏

达米安

我将Respond.js和Selectivizr用于IE8媒体查询和CSS3属性支持。不幸的是,它导致了著名的死亡白屏。

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

我尝试过的

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

我正在使用什么:

  • jQuery的
  • Response.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为我解决了。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章