为什么 phone 数字的字体颜色在 iOS 上是蓝色的?

Why is the font color of a phone number blue on iOS?

有谁知道为什么iPad iOS 11.0, iPhone 7 iOS 11.0, iPhone X iOS11.0.3是蓝色的?我尝试通过多种方式更改颜色,但根本不起作用,我的电子邮件代码中甚至没有任何蓝色,所以必须计算它!

<table width="100%" border="0" cellpadding="0" cellspacing="0" align="right" style="background: #333d47; text-align: left; color: #FFFFFF;">
  <tr>
    <td style="font-family:Arial, sans-serif;font-size: 12px; color: #FFFFFF; margin:0; padding:20px; font-weight: 300 !important;">Contact us now: <span editable="true" style="color: #FFFFFF;">+1(555) 555-555</span>
    </td>
  </tr>
</table>

iOS 将其解释为 phone 数字的字符串默认呈现为可点击链接。

使用 format-detection 元标记,您可以禁用此功能:

<meta name="format-detection" content="telephone=no">

参见:Supported Meta Tags

您只需定义 color in span tag 如下所示

 a { color: #FFFFFF !important; }
  span { color: #FFFFFF !important; }
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="right" style="background: #333d47; text-align: left; color: #FFFFFF;">
  <tr>
    <td style="font-family:Arial, sans-serif;font-size: 12px; color: #FFFFFF; margin:0; padding:20px; font-weight: 300 !important;">Contact us now: <span editable="true" style="color: #FFFFFF;">+1(555) 555-555</span>
    </td>
  </tr>
</table>

iOS 让我们 x-apple-data-detectors 可以解决 Apple Mail 干扰 auto-detecting phone 号码和地址并使它们成为链接的问题。在您的 <style> 标签中放置类似这样的内容应该可以解决问题:

*[x-apple-data-detectors] {
    border-bottom: 0 !important;
    cursor: default !important;
    color: inherit !important;
    text-decoration: none !important;
}

这 CSS 解决了大多数客户的问题

*[x-apple-data-detectors],  /* iOS */
    .x-gmail-data-detectors,    /* Gmail */
    .x-gmail-data-detectors *,
    .aBn {
        border-bottom: 0 !important;
        cursor: default !important;
        color: inherit !important;
        text-decoration: none !important;
        font-size: inherit !important;
        font-family: inherit !important;
        font-weight: inherit !important;
        line-height: inherit !important;
    }

请尝试将此添加到您的网站header

<meta name="format-detection" content="telephone=no" />

发生这种情况是因为 iOS 检测到 phone 号码并将它们变成链接,人们可以点击这些链接来呼叫它们。您可以通过将其添加到您的部分来关闭该行为。