![896d2f98ff59b7d2b3642c6e857da4d1.png](https://i-blog.csdnimg.cn/blog_migrate/489430638108c7f752a05dda81e9f45b.jpeg)
Vue 自定义字体
- 首先引入字体文件
![8ab0ac832d2c5ad3433be765250eb5fd.png](https://i-blog.csdnimg.cn/blog_migrate/086076d03a1c3467691a46f56bf6666f.png)
- 引入字体到项目
@font-face {
font-family: "UnidreamLED";
src: url('./1.ttf');
}
- 添加webpack解析
rules:[
{
test: /.(woff2?|eot|ttf|otf)(?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
</