自定义字体不会显示

时间:2019-03-21 12:17:34

标签: html css

一个简单的问题,但我终生无法显示自定义字体。我该如何修改此代码?

   

@font-face {
     font-family: 'amatic_scregular';
     src: url('/webfont-webfont.eot');
     src: url('/webfont-webfont.eot?#iefix') format('embedded-opentype'),
     url('/webfont-webfont.woff2') format('woff2'),
     url('/webfont-webfont.woff') format('woff'),
     url('/webfont-webfont.ttf') format('truetype'),
     url('/webfont-webfont.svg#amatic_scregular') format('svg');
     font-weight: normal;
     font-style: normal;
 }
    
#font {
    font-family: 'amatic_scregular';
    }
<div id="font">
<h1>TEXT HERE</h1>
</div>

谢谢:)

1 个答案:

答案 0 :(得分:0)

字体家族名称应写为字符串:

font-family: 'webfontimport';
相关问题