我知道nuxt上的一些帖子.js github repo对此做了一些介绍,但我想知道在nuxt中使用字体文件的正确方法是什么.js.
到目前为止,我们在/static/fonts
目录中有它们,但其他人使用assets
来存储字体文件.
也有不同的方法来包含它们.
@font-face {
font-family: 'FontName';
font-weight: normal;
src: url('~static/fonts/font.file.eot'); /* IE9 Compat Mode */
src: url('~static/fonts/font.file.woff') format('woff'),
url('~static/fonts/font.file.otf') format('otf'),
url('~static/fonts/font.file.eot') format('eot');
}
谢谢你的澄清:D.
J