在流星中使用font-face? [英] using font-face in meteor?

查看:146
本文介绍了在流星中使用font-face?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



  

我试图在流星中使用CSS @ font-face,但由于某种原因, @ font-face {
font-family:printFailed;
src:
url(../ public / fonts / wlm_print_failed.ttf),
url(../ public / fonts / wlm_print_failed.eot);
}

我检查了我的路径和拼写。 b

当我检查浏览器中的元素时,显示文件路径和名称是正确的,但是浏览器正在替换通用字体而不是预期的自定义字体。



任何指针?
Thanks。

解决方案

只要使用 /

 <$ c $>  public 成为网页浏览器的根目录c> @ font-face {
font-family:printFailed;
src:
url(/ fonts / wlm_print_failed.ttf),
url(/ fonts / wlm_print_failed.eot);
}


I am trying to use CSS @font-face in meteor, but for some reason it isn't working:

@font-face {
    font-family: printFailed; 
    src:
    url("../public/fonts/wlm_print_failed.ttf"),
    url("../public/fonts/wlm_print_failed.eot");
}

I've checked my paths and spelling.

When I inspect the element in the browser it appears that the filepaths and names are correct, but that the browser is substituting a generic font instead of the intended custom font.

Any pointers? Thanks.

解决方案

Just use / as everything in public becomes the root directory from the point of view of the web browser:

@font-face {
    font-family: printFailed; 
    src:
    url("/fonts/wlm_print_failed.ttf"),
    url("/fonts/wlm_print_failed.eot");
}

这篇关于在流星中使用font-face?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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