@ font-face适用于某些字体,但不是全部,即使它们具有相同的扩展名

时间:2014-01-01 18:16:30

标签: css fonts

我用这种方式在我的CSS中调用我的字体。

@font-face {
    font-family: 'mathilderegular';
    src: url('../font/mathilde/mathilde-webfont.eot');
    src: url('../font/mathilde/mathilde-webfont.eot?#iefix') format('embedded-opentype'),
         url('../font/mathilde/mathilde-webfont.woff') format('woff'),
         url('../font/mathilde/mathilde-webfont.ttf') format('truetype'),
         url('../font/mathilde/mathilde-webfont.svg#mathilderegular') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'microsoft_yi_baitiregular';
    src: url('../font/msyi/msyi-webfont.eot');
    src: url('../font/msyi/msyi-webfont.eot?#iefix') format('embedded-opentype'),
         url('../font/msyi/msyi-webfont.woff') format('woff'),
         url('../font/msyi/msyi-webfont.ttf') format('truetype'),
         url('../font/msyi/msyi-webfont.svg#microsoft_yi_baitiregular') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face{
    font-family:'love';
    src: url('../font/love.ttf');
}

并将其分配给一个班级:

.titel{font-family: 'mathilderegular';}

使用'love'字体一切正常,但其他字体不起作用。我以与“爱”字体相同的方式调用它们,但这也不起作用。

我的css在css文件夹中。

有人知道这里有什么问题吗?

编辑: 在dafont.com

上找到了mathilde字体

使用fontsquirrel生成

html:<span class="titel">Wie, Wat, Waar?</span>

0 个答案:

没有答案