我正在尝试安装一个自定义的本地字体,但它看起来不工作。
风格css:
@font-face {
font-family: "TTNorms";
src: url("./fonts/TTNorms.eot");
src: url("./fonts/TTNorms.eot?#iefix") format("embedded-opentype"),
url("./fonts/TTNorms.woff2") format("woff2"),
url("./fonts/TTNorms.woff") format("woff"),
url("./fonts/TTNorms.ttf") format("truetype"),
url("./fonts/TTNorms.svg#TTNorms-Regular") format("svg");
font-weight: normal;
font-style: normal;
}
我的字体文件夹:
fonts
├── TTNorms-Regular.eot
├── TTNorms-Regular.svg
├── TTNorms-Regular.ttf
├── TTNorms-Regular.woff
├── TTNorms-Regular.woff2
但是,当我尝试设置任何元素的
font-family: "TTNorms"
它不起作用。我做错了什么?