CSS字体无法加载
我正在尝试加载日记字体,但不管出于什么奇怪的原因,它都无法加载CSS字体无法加载,css,fonts,pyrocms,Css,Fonts,Pyrocms,我正在尝试加载日记字体,但不管出于什么奇怪的原因,它都无法加载 @font-face { font-family: Brandon Grotesque; src: url(/addons/shared_addons/themes/axium/fonts/brandon-grotesque.ttf) format("truetype"); } @font-face { font-family: Journal; src: url(/addons/shared_ad
@font-face {
font-family: Brandon Grotesque;
src: url(/addons/shared_addons/themes/axium/fonts/brandon-grotesque.ttf) format("truetype");
}
@font-face {
font-family: Journal;
src: url(/addons/shared_addons/themes/axium/fonts/journal.ttf) format("ttf");
}
body {
font-family: Journal;
}
布兰登怪诞的作品,但杂志没有
我从以下网站下载:
有什么帮助吗?结尾的格式标识符错误:
format("ttf");
它应该是formattruetype,就像Brandon Grotesque一样。结尾的格式标识符是错误的:
format("ttf");
它应该是formattruetype,就像Brandon Grotesque一样。首先,将ttf更改为truetype:
src: url(/addons/shared_addons/themes/axium/fonts/brandon-grotesque.ttf) format("truetype");
然后,通过检查chrome中的开发者工具f12,确保它位于正确的位置
此外,您必须知道,并非所有浏览器都支持ttf格式,您可以在此处查看:
此外,您需要知道,windows、macos/linux中的字体呈现方式不同,windows下的chrome字体可能不像macos/linux中的字体那样吸引人。首先,将ttf更改为truetype:
src: url(/addons/shared_addons/themes/axium/fonts/brandon-grotesque.ttf) format("truetype");
然后,通过检查chrome中的开发者工具f12,确保它位于正确的位置
此外,您必须知道,并非所有浏览器都支持ttf格式,您可以在此处查看:
另外,您需要知道,字体在windows、macos/linux中呈现的方式不同,并且字体在windows下的chrome中可能不像在macos/linux中那样吸引人