Respond.js with external css resources

2019-08-06 02:12发布

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.

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?

1条回答
我只想做你的唯一
2楼-- · 2019-08-06 02:42

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

See https://github.com/scottjehl/Respond#cdnx-domain-setup and check out the cross-domain example at 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>
查看更多
登录 后发表回答