【问题标题】:Respond.js CDN/X-Domain SetupRespond.js CDN/X-Domain 设置
【发布时间】:2013-02-06 20:32:37
【问题描述】:

我正在尝试让 respond.js 使用他们的 CDN/X-Domain 指令,但效果不佳。在 IE8 中仍然没有加载媒体查询。

我什至上传了示例cross-domain 文件夹来测试和调整文件的路径

在我的<head> 我有:

<link href="http://mywebsite.wpengine.netdna-cdn.com/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<link href="http://mywebsite.com/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />
<script src="http://mywebsite.com/respond.proxy.js"></script>
  • 我将在上述文件之前链接到 respond.js 本身
  • 当 CDN 关闭时,媒体查询在 ie8 中工作
  • IE8 没有输出错误
  • 我使用 WPEngine 托管,他们已将 response-proxy.html 添加到 CDN 中。 - 我仔细检查了文件,它们都存在。

【问题讨论】:

标签: javascript internet-explorer-8 cross-domain media-queries


【解决方案1】:

这就是我的工作方式,remote 指的是远程 URL,本地指的是本地资产。 确保在调用 respond.js 之前链接到您的样式表。

<!--[if lt IE 9]>
  <script src='//remote/respond.min.js'></script>
  <link href="//remote/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
  <link href="/local/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />
  <script src="/local/respond.proxy.js"></script>
<![endif]-->

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-12-14
  • 1970-01-01
  • 1970-01-01
  • 2011-01-28
  • 1970-01-01
  • 1970-01-01
  • 2021-06-19
相关资源
最近更新 更多