CSS的Font-Face网址不工作? [英] CSS Font-Face url not working?

查看:180
本文介绍了CSS的Font-Face网址不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  @ font-face {
font-family:'MuseoSans-700';
src:url('http://mysite.co.uk/clients/reload/Images/style_159306.eot');
src:url('http://mysite.co.uk/clients/reload/Images/style_159306.eot?#iefix')format('embedded-opentype'),
url('style_159306 .woff')格式('woff'),
url('style_159306.ttf')格式('truetype');



$ b $ p
$ b

只有我的字体没有被渲染,而是被显示为我的后备,arial。

如果我把url粘贴到我的浏览器中,它会要求我下载,所以我知道这些链接是正确的。



我使用...调用字体...

  h1 {
颜色:#272727;
字体:108px'MuseoSans-700',Helvetica,Arial,sans-serif;
letter-spacing:-7px;

$ / code>

谢谢

解决方案

看看这篇关于bullet-proof @ font-face语法的文章。 http://paulirish.com/2009/bulletproof-font-face-implementation-语法/



您也没有指定哪个浏览器正在工作或没有工作,所以我认为它们在任何浏览器都不起作用。


Im having some trouble with the @font-face selector, I have the following...

@font-face {
   font-family: 'MuseoSans-700';
      src: url('http://mysite.co.uk/clients/reload/Images/style_159306.eot');
      src: url('http://mysite.co.uk/clients/reload/Images/style_159306.eot?#iefix')  format('embedded-opentype'),
           url('style_159306.woff') format('woff'),
           url('style_159306.ttf') format('truetype');
    }

Only my fonts arent being rendered and instead im being shown my fallback, arial.

If i paste the url to the font into my browser it asks me to download so i know the links correct, is there something im doing wrong in the above?

Im calling the font using...

h1 {
color:#272727;
font:108px 'MuseoSans-700',Helvetica,Arial,sans-serif;
letter-spacing:-7px;
}

Thanks

解决方案

Check out this article on bullet-proof @font-face syntax. http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/

You also didn't specify which browsers it's working or not working in so I assume it's not working in any of them.

这篇关于CSS的Font-Face网址不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆