使用外部css资源Respond.js [英] Respond.js with external css resources

查看:182
本文介绍了使用外部css资源Respond.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了优化我们的网页到IE8,我们需要添加带有respond.js的MediaQueryes(或其他类似的解决方案)。但似乎respond.js(以及许多类似的解决方案)需要本地css文件。

To optimize our webpages to IE8 we need to add MediaQueryes with respond.js (or other simular solution). But it seems that respond.js (and many simular solutions) require local css files.

例如,我们喜欢使用cdn-css for leafletjs,但这不会被IE8纠正。

For example we liked to use the cdn-css for leafletjs, but this will not correct by IE8.

有关如何做到这一点的任何想法?

Any ideas of how to do this?

推荐答案

如果你设置一个代理页面供它引用,Respond.js实际上是有效的。

Respond.js actually works if you set up a provide a proxy page for it to reference.

请参阅 https:// github .com / scottjehl / Respond#cdnx-domain-setup 并查看 https://github.com/scottjehl/Respond/tree/master/cross-domain

<!-- Respond.js proxy on external server -->
<link href="http://externalcdn.com/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />

<!-- Respond.js redirect location on local server -->
<link href="/path/to/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />

<!-- Respond.js proxy script on local server -->
<script src="/path/to/respond.proxy.js"></script>

这篇关于使用外部css资源Respond.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆