用于 CSS3 媒体查询的 Respond.js
我正在尝试在旧版 IE 上使用 Respond.js 进行 CSS3 媒体查询 https://github.com/scottjehl/Respond
我收到一些 Javascript 中的访问被拒绝消息。
我尝试过类似 http://scottjehl.github.com/Respond/cross-domain/example.html
我认为需要完成一些跨域设置......但我不确定为什么需要这样做。我现在只需要在本地测试所有内容。 所以我在本地拥有所有文件...请帮我解决这个问题。
对于类似的易于使用的库的任何其他建议也很好。
I am trying to use Respond.js for CSS3 Media Queries on older IE versions
https://github.com/scottjehl/Respond
I am getting some Access denied message in Javascript.
I have tried similar to
http://scottjehl.github.com/Respond/cross-domain/example.html
I think there are some cross-domain setup to be done...But I am not sure why that is needed. I just need to test everything locally as of now.
So I have all the files locally...Please help me fix this issue.
Any other suggestions for similar easy-to-use library would also be fine..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您声明您正在本地硬盘上运行测试。
根据 Repond.js 文档,您将遇到以下问题:
因此,如果您只是从 C: 驱动器加载页面,则需要安装本地主机 Web 服务器才能使其正常工作。
此外,即使您在 Web 服务器上运行,如果 respond.js 文件位于与主页不同的域(或子域)上,那么您将需要进行一些跨域设置。
同样,这是有记录的;请参阅文档中标题为“CDN/X-Domain 设置”的部分。它包括示例,并引用源代码中提供的示例文件。
you state that you're running the test on your local hard disk.
According to the Repond.js documentation, you will have issues with this:
So if you're just loading pages from your C: drive, you will need to install a localhost web server to get it working.
Additionally, even if you are running on a web server, if the respond.js file is on a different domain (or subdomain) from your main page, then you will need to do some cross-domain setup.
Again, this is documented; see the section in the documentation entitled "CDN/X-Domain Setup". It includes examples, and references an example file available with the source.