Html Fontello在iOS上渲染,但不在Android和桌面浏览器上渲染
我有一个问题,我自定义下载的Fontello是在iOS的Chrome和Safari上加载的,而不是在Android或桌面浏览器上加载的(调整窗口大小时)。该字体用于每篇文章中移动共享按钮中的图标 网站: 加价:Html Fontello在iOS上渲染,但不在Android和桌面浏览器上渲染,html,css,fontello,Html,Css,Fontello,我有一个问题,我自定义下载的Fontello是在iOS的Chrome和Safari上加载的,而不是在Android或桌面浏览器上加载的(调整窗口大小时)。该字体用于每篇文章中移动共享按钮中的图标 网站: 加价: <div> <ul class='mobile-share-bar'> <li><script> var strPostUrl = "<data:post.url/>";
<div>
<ul class='mobile-share-bar'>
<li><script>
var strPostUrl = "<data:post.url/>";
document.write("<a class='mobile-share-button icon-facebook' href='http://www.facebook.com/sharer.php?u="+strPostUrl+"' id='fb-mobile-button' target='_blank'><span class='share-text'>Share</span></a>");
</script></li>
<li><script>
var strPostUrl = "<data:post.url/>";
var strPostTitle = '<data:post.title/>';
document.write("<a class='mobile-share-button icon-twitter' href='https://twitter.com/share?text="+strPostTitle+"&url="+strPostUrl+"&via=MTS_Collective' id='twitter-mobile-button' target='_blank'><span class='share-text'>Share</span></a>");
</script></li>
<li><script>
var strPostUrl = "<data:post.url/>";
var strPostTitle = '<data:post.title/>';
var strNewUrl = strPostUrl.replace("http://","");
var strNewTitle = strPostTitle.replace(/"/g, '"');
document.write("<a class='mobile-share-button icon-tumblr' href='http://www.tumblr.com/share/link?url="+strNewUrl+"&name="+strNewTitle+"' id='tumblr-mobile-button' target='_blank'><span class='share-text'>Share</span></a>");
</script></li>
</ul>
</div>
我真的不确定是什么原因使它无法在任何地方工作。我已清除iOS上的缓存,以确保它正在读取最新代码
任何帮助都将不胜感激 未在OS X上的Chrome中加载。控制台显示:
Font from origin'http://cdn.mtscollective.com'已被跨源资源共享策略阻止加载:请求的资源上不存在'Access Control Allow Origin'标头。起源'http://www.mtscollective.com因此,不允许访问。
看起来您可能遇到了与此问题相同的问题:
我会看看这个答案:
您需要修改
.htaccess
以允许跨源请求。啊,是的。虽然我从未修改过.htcaccess文件,但我看到了这个问题。我得再做一些谷歌搜索。谢谢没问题。如果你被卡住了,我们会在这里!
@import url(http://fonts.googleapis.com/css?family=Oswald);
@font-face {
font-family: 'fontello';
src: url('http://cdn.mtscollective.com/fontello/font/fontello.eot?4448318');
src: url('http://cdn.mtscollective.com/fontello/font/fontello.eot?4448318#iefix') format('embedded-opentype'),
url('http://cdn.mtscollective.com/fontello/font/fontello.woff?4448318') format('woff'),
url('http://cdn.mtscollective.com/fontello/font/fontello.ttf?4448318') format('truetype'),
url('http://cdn.mtscollective.com/fontello/font/fontello.svg?4448318#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"]:before, [class*=" icon-"]:before
{
font-family: "fontello";
color: #fff;
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
text-align: center;
font-variant: normal;
text-transform: none;
line-height: 1em;
margin-right: .3em;
}
.icon-facebook:before
{
content: '\e806';
}
.icon-twitter:before
{
content: '\e809';
}
.icon-tumblr:before
{
content: '\e808';
}