我的问题是自定义字体在使用时不显示@font-face
。
我的 CSS 在它自己的文件中被引用,代码是:
@font-face {
font-family: 'MerceariaAntique';
src: url('type/mercearia_new/21319b_0_0-mercearia.eot');
src: url('type/mercearia_new/21319b_0_0-mercearia.eot?#iefix') format('embedded- opentype'),
url('type/mercearia_new/21319b_0_0-mercearia.woff') format('woff'),
url('type/mercearia_new/21319b_0_0-mercearia.ttf') format('truetype'),
url('type/mercearia_new/21319b_0_0-mercearia.svg#webfontuploaded_file') format('svg');
font-weight: normal;
font-style: normal;
}
在我的 HTML 文件中,我在主 CSS 文件旁边将其引用为以下内容:
<link rel="stylesheet" type="text/css" media="all" href="css/fonts.css" />
我怀疑我错误地引用了它,但我不知道如何正确引用它。