My website正在响应。blog section使用了一个指向Tumblr的子域,但是跨域版本的Respond.js无法工作。我正在做这个:
<script src="http://www.stevechab.com/scripts/respond.min.js"></script>
<link href="http://www.stevechab.com/scripts/respond-proxy.html" id="respond-proxy" rel="respond-proxy">
<link href="http://www.stevechab.com/scripts/respond.proxy.gif" id="respond-redirect" rel="respond-redirect">
<script src="http://www.stevechab.com/scripts/respond.proxy.js"></script>我假设问题是respond.proxy.gif和respond.proxy.js不在blog.stevechab.com上...但这不是违背了拥有跨域版本的Respond.js的目的吗?我的假设是正确的,还是我错过了什么?有没有解决这个问题的办法?
注意:我尝试过http://www.tumblr.com/themes/upload_static_file ...没有骰子。
发布于 2012-05-25 23:54:02
引用respond.js自述文件:
Respond.js的工作原理是通过AJAX请求CSS的原始副本,所以如果您在CDN (或子域)上托管样式表,您将需要上传一个代理页面来实现跨域通信。
-我的重点。跨域版本的目的是让您能够处理从另一个域加载的样式表,而不是respond.js正在处理的域。然而,在Tumblr的例子中,你添加了第三个域:static.tumblr.com,你的代理脚本和gif就是在这里登陆的。这不可能,也不会奏效。
发布于 2012-09-13 04:11:15
@Steve Chab,
respond.js和respond.proxy.js不适合你有两个原因。
- _Note: Bug is caused by respond.proxy.js ajax/xml functions_
请在下面找到重新修改的工作标记,让respond.js & respond.proxy.js在你的网站上工作。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="http://www.stevechab.com/styles/styles.css">
<!--[if (lt IE 9) & (!IEMobile 7)]>
<link href="//blog.stevechab.com/scripts/respond-proxy.html" id="respond-proxy" rel="respond-proxy">
<link href="//www.stevechab.com/scripts/respond.proxy.gif" id="respond-redirect" rel="respond-redirect">
<![endif]-->
</head>
<body>
<!-- Your content goes here. -->
<!--[if (lt IE 9) & (!IEMobile 7)]>
<script src="//www.stevechab.com/scripts/respond.min.js"></script>
<script src="//www.stevechab.com/scripts/respond.proxy.js"></script>
<![endif]-->
</body>
</html>上的GitHub
用于Wordpress
的
推特Bootstrap
使用的
https://stackoverflow.com/questions/10749070
复制相似问题