字体在 iPhone 上不起作用

font-face not working on iPhone

我已经按照这个问题的答案中所述设置了我的字体:

以下是我的设置方式:

@font-face {
font-family: 'SF Distant Galaxy';
src: url('./files/SFDistantGalaxy.eot');
src: url('./files/SFDistantGalaxy.eot?#iefix') format('embedded-opentype'),
    url('./files/SFDistantGalaxy.woff2') format('woff2'),
    url('./files/SFDistantGalaxy.woff') format('woff'),
    url('./files/SFDistantGalaxy.ttf') format('truetype'),
    url('./files/SFDistantGalaxy.svg#SFDistantGalaxy') format('svg');
font-weight: normal;
font-style: normal;
}

这里正在使用它:

#title {
font-family: 'SFDistantGalaxy';
letter-spacing: 3.3px;
text-align: center;
color: #f8e71c;
font-size: 95px;
}

当我在浏览器中打开它时,它加载得很好。但是当我在 phone 上打开它时,它显示的是 Times New Roman。

这是网站: http://starwarsplanets.com/

我希望得到任何反馈!谢谢!

您需要更改 css 字体标题以匹配字体:

#title {
    font-family: 'SF Distant Galaxy';
    color: #f8e71c;
    font-size: 95px;
    margin: 10px 0 10px 0;
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
}