下面是我的代码:
@font-face {
font-family: Gotham;
src: url("Gotham-Book.otf") format("opentype");
}我已经尝试了不同的迭代。我还尝试了各种路径,看看这是不是问题所在。不确定交易到底是什么。
我的网站上的字体默认为Times New Roman字体。
发布于 2019-02-11 22:56:52
您可以使用此css。
如果字体和html文件在同一目录下,这应该是可行的,否则你需要设置一个合适的url。
@font-face {
font-family: Gotham;
src: url("Gotham-Book.otf") format("opentype");
}
body{
font-size: 3rem;
font-family: Gotham;
}https://stackoverflow.com/questions/54560933
复制相似问题