Respond.js with external css resources

我的未来我决定 提交于 2020-01-05 12:12:38

问题


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:


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>


来源:https://stackoverflow.com/questions/24205508/respond-js-with-external-css-resources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!