【问题标题】:iOS: Webfont displaying on home page, but not subpagesiOS:网页字体显示在主页上,但不显示子页面
【发布时间】:2015-11-17 04:21:28
【问题描述】:

我正在为客户here 建立一个新网站 - 嵌入式网络字体在 Safari 和 Chrome (MacOS) 中显示得很好......但仅在 iOS 下的主页上。在 iOS 的子页面上,它默认为 Times Roman。 webfont 文件位于根目录中。

难住了。有什么帮助吗?这是我的 CSS:

/**
 * @license
 * MyFonts Webfont Build ID 3124015, 2015-11-11T18:29:33-0500
 * 
 * The fonts listed in this notice are subject to the End User License
 * Agreement(s) entered into by the website owner. All other parties are 
 * explicitly restricted from using the Licensed Webfonts(s).
 * 
 * You may obtain a valid license at the URLs below.
 * 
 * Webfont: Tiki-Solid by Pelavin Fonts
 * URL: http://www.myfonts.com/fonts/pelavin/tiki/solid/
 * 
 * Webfont: Tiki by Pelavin Fonts
 * URL: http://www.myfonts.com/fonts/pelavin/tiki/regular/
 * 
 * 
 * License: http://www.myfonts.com/viewlicense?type=web&buildid=*******
 * Licensed pageviews: 10,000
 * Webfonts copyright: Copyright (c) 2011 by Daniel Pelavin. All rights reserved.
 * 
 * © 2015 MyFonts Inc
*/


/* @import must be at top of file, otherwise CSS will not work */
@import url("//hello.myfonts.net/count/2fab2f");

  
@font-face {font-family: 'Tiki-Solid';src: url('webfonts/2FAB2F_0_0.eot');src: url('webfonts/2FAB2F_0_0.eot?#iefix') format('embedded-opentype'),url('webfonts/2FAB2F_0_0.woff2') format('woff2'),url('webfonts/2FAB2F_0_0.woff') format('woff'),url('webfonts/2FAB2F_0_0.ttf') format('truetype');}
 
  
@font-face {font-family: 'Tiki';src: url('webfonts/2FAB2F_1_0.eot');src: url('webfonts/2FAB2F_1_0.eot?#iefix') format('embedded-opentype'),url('webfonts/2FAB2F_1_0.woff2') format('woff2'),url('webfonts/2FAB2F_1_0.woff') format('woff'),url('webfonts/2FAB2F_1_0.ttf') format('truetype');}
h1, h2, h3, h4, h5, h6 { 
	font-family: Tiki-Solid; 
	font-weight: normal; 
	font-style: normal; 
}
h1, h2, h3, h4, h5, h6 {
    letter-spacing: 4px;
      line-height: 80%;
}

【问题讨论】:

    标签: ios webfonts


    【解决方案1】:

    看看你的检查员。字体文件位于根目录,但正在子目录中查找(但未找到)它们。

    加载资源失败:服务器响应状态为 404(未找到) http://www.damonsglendale.com/new/lunch/webfonts/2FAB2F_0_0.ttf

    您可以通过指定整个路径来解决此问题,而不是相对引用它们。

    【讨论】:

    • 谢谢!我会试试看。
    猜你喜欢
    • 2015-12-07
    • 2020-06-16
    • 2015-07-18
    • 2015-06-04
    • 1970-01-01
    • 1970-01-01
    • 2015-01-17
    • 1970-01-01
    • 2014-05-25
    相关资源
    最近更新 更多