@字体不适用于我的骨骼Wordpress主题
我正在尝试在Bones Wordpress主题中使用自定义字体。我的字体系列和主题说明一样位于“库>字体”文件夹中@字体不适用于我的骨骼Wordpress主题,wordpress,font-face,Wordpress,Font Face,我正在尝试在Bones Wordpress主题中使用自定义字体。我的字体系列和主题说明一样位于“库>字体”文件夹中 @font-face { font-family: 'ColaborateThinRegular'; src: url('library/fonts/ColabThi-webfont.eot'); src: url('library/fonts/ColabThi-webfont.eot?#iefix') format('emb
@font-face {
font-family: 'ColaborateThinRegular';
src: url('library/fonts/ColabThi-webfont.eot');
src: url('library/fonts/ColabThi-webfont.eot?#iefix') format('embedded-opentype'),
url('library/fonts/ColabThi-webfont.woff') format('woff'),
url('library/fonts/ColabThi-webfont.ttf') format('truetype'),
url('library/fonts/ColabThi-webfont.svg#ColaborateThinRegular') format('svg');
font-weight: normal;
font-style: normal;
}
我在样式表中这样称呼它:
font-family: 'ColaborateThinRegular';
@font-face {
font-family: 'ColaborateThinRegular';
src: url('../fonts/ColabThi-webfont.eot');
src: url('../fonts/ColabThi-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/ColabThi-webfont.woff') format('woff'),
url('../fonts/ColabThi-webfont.ttf') format('truetype'),
url('../fonts/ColabThi-webfont.svg#ColaborateThinRegular') format('svg');
font-weight: normal;
font-style: normal;
}
我试过很多不同的字体,但都不管用。我在这里遗漏了什么?我在骨骼上也遇到了同样的问题,并使用相对路径升级一个目录来修复它。对你来说应该是这样的:
font-family: 'ColaborateThinRegular';
@font-face {
font-family: 'ColaborateThinRegular';
src: url('../fonts/ColabThi-webfont.eot');
src: url('../fonts/ColabThi-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/ColabThi-webfont.woff') format('woff'),
url('../fonts/ColabThi-webfont.ttf') format('truetype'),
url('../fonts/ColabThi-webfont.svg#ColaborateThinRegular') format('svg');
font-weight: normal;
font-style: normal;
}
希望这有帮助