Exo字体面向本地

时间:2015-07-27 19:48:44

标签: html css fonts font-face

FontSquirrell 上,我已将字体 Exo ttf 转换为所有可能的版本,我已将所有字体放入 fonts> exo 以及 CSS 文件中的此代码:

@font-face{
    font-family: 'exoblack';
    src: url('/fonts/exo/exo-black-webfont.eot');
    src: url('/fonts/exo/exo-black-webfont.eot?#iefix') format('embedded-opentype'),
         url('/fonts/exo/exo-black-webfont.woff2') format('woff2'),
         url('/fonts/exo/exo-black-webfont.woff') format('woff'),
         url('/fonts/exo/exo-black-webfont.ttf') format('truetype'),
         url('/fonts/exo/exo-black-webfont.svg#exoblack') format('svg');
    font-weight: normal;
    font-style: normal;
}

为什么我在本地看不到字体?我试图把 src:local

@font-face{
    font-family: 'exoblack';
    src: url('/fonts/exo/exo-black-webfont.eot');
    **src: local('exoblack'), url('/fonts/exo/exo-black-webfont.eot') format('embedded-opentype');**
    src: url('/fonts/exo/exo-black-webfont.eot?#iefix') format('embedded-opentype'),
         url('/fonts/exo/exo-black-webfont.woff2') format('woff2'),
         url('/fonts/exo/exo-black-webfont.woff') format('woff'),
         url('/fonts/exo/exo-black-webfont.ttf') format('truetype'),
         url('/fonts/exo/exo-black-webfont.svg#exoblack') format('svg');
    font-weight: normal;
    font-style: normal;
}

我做错了什么?

0 个答案:

没有答案