0

当我尝试将下面显示的代码添加到我的 CSS3 样式表时,我收到错误消息,指出“格式(‘xxxx’)’不是 src 属性的有效值。如果我在“格式化”之前删除空格,错误就会消失,但我不知道是否正在处理代码。

我快筋疲力尽了。有没有人有任何想法?

谢谢,

尤里

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

2 回答 2

0

您可以尝试在下面使用它吗,替换路径

@font-face {
    font-family: 'LatoLight';
    src: url('../fonts/Lato-Lig-webfont.eot');
    src: url('../fonts/Lato-Lig-webfont.eot?#iefix') format('embedded-opentype'),
        url('../fonts/Lato-Lig-webfont.woff') format('woff'),
        url('../fonts/Lato-Lig-webfont.ttf') format('truetype'),
        url('../fonts/Lato-Lig-webfont.svg#LatoLight') format('svg');
    font-weight: normal;
    font-style: normal;
}
于 2013-06-14T20:57:32.823 回答
0

尝试添加:

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

此外,这看起来像是一个很好的指南@font-face

于 2013-06-14T21:01:32.640 回答