我的字体错误 - 给我 404 到一边

Error on my Font-face - Give me 404 get to the side

这就是我尝试在网站中制作超棒的字体和简单的线条图标的方法,但它们继续向我显示页面的 404 错误。

我已经与 CSS 核实过它是否完全适合。并将其拉出到页面上。

如果我把文件拿走所以没有错误,但我再次添加它们,然后他们就会出现。

我试过了Why is @font-face throwing a 404 error on woff files?

我看过他们的CSS,他们看起来像这样:

单行-icons.css

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

字体-awesome.css

@font-face {
    font-family: 'FontAwesome';
    src: url('../fonts/fontawesome-webfont.eot?v=4.4.0');
    src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'), 
        url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'), 
        url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'), 
        url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'), 
        url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

这里我显示我的文件就在正确的位置 这可能与我旁边有 https 有关系吗??

我买了design (Porto)

我遇到过类似的问题,只是调整 URL 的顺序似乎可以解决问题。试试你的第一个字体,如果成功,你就有了 Font Awesome 的基础。虽然我通常更喜欢尽可能使用 CDN:

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