OGeek|极客世界-中国程序员成长平台

标题: html - 为什么iOS上电话号码的字体颜色是蓝色的? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 14:39
标题: html - 为什么iOS上电话号码的字体颜色是蓝色的?

有谁知道为什么iPad iOS 11.0、iPhone 7 iOS 11.0、iPhone X iOS 11.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>


Best Answer-推荐答案


iOS 为我们提供了 x-apple-data-detectors 来解决 Apple Mail 干预自动检测电话号码和地址并使其链接的问题。在你的 <style> 标签中放置这样的东西应该可以解决问题:

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

关于html - 为什么iOS上电话号码的字体颜色是蓝色的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49568194/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4