【问题标题】:How to add Roboto font to AMP 4 Email如何将 Roboto 字体添加到 AMP 4 电子邮件
【发布时间】:2019-09-24 03:18:40
【问题描述】:

当我添加这个时,我收到来自The AMP Validator 的错误:

<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,700|Roboto:300,400,500" rel="stylesheet">
    The tag 'link' is disallowed.

我应该如何在amp4email 中添加来自 Google 字体的字体。

【问题讨论】:

标签: amp-html amp-email


【解决方案1】:

Google 字体默认包含在 AMP4MAIL 中。您只需更改元素中的 font-family 属性。例如,身体标签将“Lato”更改为“Roboto”,它可以工作:body { font-family: 'Lato', sans-serif;}

【讨论】:

    【解决方案2】:

    AMP for Email 目前不支持自定义字体。

    #21907 是此功能请求的跟踪问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-07-08
      • 2011-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多