我将使用@ font-face。所以我将 corbel 字体复制到我的目录中,然后显示4种字体CORBEL_0.TTF , CORBELB_0.TTF , CORBELI_0.TTF , CORBELZ_0.TTF
,然后我将 Kozuka Gothic Pro 字体复制到我的目录中,并显示6种字体KozGoPro-Bold.otf , KozGoPro-ExtraLight.otf , KozGoPro-Heavy.otf , KozGoPro-Light.otf , KozGoPro-Medium.otf , KozGoPro-Regular.otf
如何使用@ font-face规则编写src? 如示例url(“../../ css / fonts / League_Gothic.eot”)格式('eot');格式eot,是字体的扩展吗?任何人都可以在@ font-face中找到完整语法的想法。
答案 0 :(得分:0)
@font-face
{
font-family: corbel;
src: url('/fonts/corbel.ttf'),
url('/fonts/corbel.eot');
}
@font-face
{
font-family: Kozuka;
src: url('/fonts/Kozuka.ttf'),
url('/fonts/Kozuka.eot');
}
答案 1 :(得分:0)
像这样:
@font-face {
font-family: 'Kozuka Gothic Pro';
src: url("../../css/fonts/Kozuka Gothic Pro.otf") format('truetype');
src: local("☺"),
url("../../css/fonts/KozGoPro-Bold.otf"),
url("../../css/fonts/KozGoPro-ExtraLight.otf") format('truetype'),
url("../../css/fonts/KozGoPro-Heavy.otf") format('truetype'),
url("../../css/fonts/KozGoPro-Light.otf") format('truetype');
url("../../css/fonts/KozGoPro-Medium.otf") format('truetype')
url("../../css/fonts/KozGoPro-Regular.otf") format('truetype');
}