gpt4 book ai didi

fonts - 在 meteor 中使用字体?

转载 作者:行者123 更新时间:2023-12-04 02:43:49 24 4
gpt4 key购买 nike

我试图在 meteor 中使用 CSS @font-face,但由于某种原因它不起作用:

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

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

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

任何指针?
谢谢。

最佳答案

只需使用 /作为 public 中的所有内容从 Web 浏览器的角度来看成为根目录:

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

关于fonts - 在 meteor 中使用字体?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16996019/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com