在流星中使用font-face? [英] using font-face in meteor?
问题描述
我试图在流星中使用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屋!