我已经下载了一个字体libertaion_sans,它保存在像\fonts\liberation_sans这样的字体文件夹下的Wordpress主题中。
我在Youtube上看到了很多视频,在StackOverflow上看到了一些链接,但我没能正确地把它们包括进去。

如果我没有错,在实际使用以下内容之前,我们必须在style.css中定义这些字体:
font-family有人能帮帮我吗。
目前,
我对使用→很感兴趣
font-family: LiberationSans-Bold;发布于 2017-07-20 08:39:47
类似于css文件=> 的
@font-face {
font-family: 'YourFontName'; /*a name to be used later*/
src: url('/fonts/font.ttf'); /*URL to font*/
}并在任何css规则中像font-family: 'YourFontName'一样使用。
干杯!
PD:分别创建每一个。
@font-face {
font-family: 'LS-bold'; /*a name to be used later*/
src: url('/fonts/ls-bold.ttf'); /*URL to font*/
}
@font-face {
font-family: 'LS-Regular'; /*a name to be used later*/
src: url('/fonts/ls-regular.ttf'); /*URL to font*/
}..etc…
如果你想使用粗体字体,你必须用字体系列:‘LS-粗体’。
明白了?
https://stackoverflow.com/questions/45209534
复制相似问题