haz*_*ack 4 css fonts twitter-bootstrap
我们遇到bootstrap 3.3.5的问题,如果使用ASPNETCDN的 bootstrap css,则Graphicons无法正常工作
以下是错误消息:
Font from origin 'http://ajax.aspnetcdn.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://fiddle.jshell.net' is therefore not allowed access.
这是一个演示http://jsfiddle.net/g7jt1tcd/4/
我搜索过但仍然没有相关信息.你能提出一些建议来解决这个问题吗?
这看起来像是ASPNETCDN的配置问题.我的建议是使用不同的CDN,因为您无法控制服务器.以下是我推荐的其他2个CDN:
例:
<script>https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.css</script>
Run Code Online (Sandbox Code Playgroud)
两个CDN都具有高可用性.我刚刚对jsfiddle测试它们并且没有问题.
见这里:http://jsfiddle.net/g7jt1tcd/4/