【问题标题】:font-face not working on iPhone字体在 iPhone 上不起作用
【发布时间】:2018-05-31 02:00:59
【问题描述】:

我已经按照这个问题的答案设置了我的字体:font-face not working on mobile

我是这样设置的:

@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;
}

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

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

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

【问题讨论】:

    标签: ios css cross-browser mobile-safari font-face


    【解决方案1】:

    您需要更改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%;
    }
    

    【讨论】:

      猜你喜欢
      • 2012-02-11
      • 2013-02-10
      • 2017-08-04
      • 2013-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-21
      相关资源
      最近更新 更多