我目前在 angular 6 中工作。我想在 style.css 中加载我的字体,但它不起作用。我的代码如下所示。有人可以建议我如何重现这个问题吗?
注意:我使用了在 angular 5 中使用的相同语法。它有什么问题?
样式.css:
@font-face {
font-family: 'Expert Sans';
src: url('assets/fonts/ExpertSans-Regular.ttf');
}
body {
font-family: 'Expert Sans' !important;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff;
margin: 0;
}
Run Code Online (Sandbox Code Playgroud)