【问题标题】:Modernizr.load not working properly in IE8Modernizr.load 在 IE8 中无法正常工作
【发布时间】:2011-06-08 12:02:02
【问题描述】:

我正在尝试加载特定的 CSS 样式表,具体取决于该浏览器是否不支持某些 CSS3 功能。

我使用的JS代码是这样的:

// Modernizr feature tests
Modernizr.load({
    test: Modernizr.borderradius,
    nope: '/assets/css/border-radius.css'
});

在 IE8 中,根据开发者工具,这给出了:

<link href="undefined" rel="stylesheet" type="text/css" />

有什么想法吗?

【问题讨论】:

    标签: javascript modernizr yepnope


    【解决方案1】:

    这似乎是 Modernizr Minifier 中的一个错误。我遇到了同样的问题,但能够手动修复。以下是详细信息:https://github.com/Modernizr/Modernizr/issues/308

    【讨论】:

      猜你喜欢
      • 2013-12-01
      • 2010-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-16
      • 2013-10-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多