1

爲了優化我們的網頁IE8我們需要添加與Response.js(或其他simular解決方案)MediaQueryes。但似乎respond.js(和許多simular解決方案)需要本地的css文件。Respond.js與外部CSS資源

例如,我們喜歡將cdn-css用於leafletjs,但這不會被IE8糾正。

任何想法如何做到這一點?

回答

0

如果您設置了一個提供代理頁面供其參考,Respond.js實際上可行。

參見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> 
檢查出的跨域示例