电子邮件链接更改为蓝色(Apple Mail mac/ios)

问题描述 投票:0回答:5

我正在设计一个新的电子邮件签名,每次我从 Apple Mail 中转发或回复该电子邮件时,它都会变成蓝色。

我可以在苹果邮件中看到它是蓝色的,但在 f.i. 中也可以看到它。在 Gmail 中。因此,这不是 Apple Mail 显示蓝色链接的问题,而是使其变成蓝色的问题。

这是一个示例代码,已内联并格式化以提高可读性。

<p style="font-size: 15px; line-height: 18px;">
  <a 
    href="http://example.com" 
    x-apple-data-detectors="true" 
    style="font-size: 15px; 
    line-height: 18px; 
    color: #000000 !important; 
    text-decoration: underline !important; 
    text-decoration-color: #000000 !important; 
    pointer-events: visible;">
    www.example.com
</a>
</p>

到目前为止我尝试过的:

  • spans
    标签周围和内部创建
    a
  • x-apple-data-detectors
    设置为 true 和 false
  • 设置
    <meta content="email=no" name="format-detection">
    也适用于其他链接类型
  • 将链接文本设置为仅文本,例如“单击此处”,但它们仍然会被识别和转换。

我找不到太多关于

x-apple-data-detectors
的信息,想知道是否有更好的方法来调试它们。

非常感谢帮助。

html css macos email html-email
5个回答
1
投票

尝试了上述所有步骤后仍然一无所获。作为一个可怕的解决方法,我发现添加引用“#”的链接将覆盖蓝色文本。

<a target="_blank" class="bluelinks" style="font-size: 16px; color: rgb(0, 0, 0); text-decoration: none;" href="#">before midnight on July 4th</a>

0
投票

代码是否有可能在链接上处于活动状态? 您是否尝试过在活动状态下设置颜色?


0
投票

我在一些 HTML 电子邮件的 CSS 中遇到过这种情况。这似乎是其他人解决这个问题的方法。

[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; }

我无法访问测试此功能所需的Apple软件,因此我只是将其作为我尚未测试过的想法来分享。


-1
投票

尝试将其添加到您的

<head>

<style type="text/css">
.appleLinksBlack a {
  color: #000000!important; 
  text-decoration: underline!important;
  }
</style>

然后在

<a>
的父级上使用该类,例如:

<p class="appleLinksBlack" style="font-size: 15px; line-height: 18px;">


-1
投票

我花了一个小时解决这个问题,刚刚发现Mac上的苹果邮件只是将#000000链接更改为蓝色。如果您使用其他颜色(例如不同的深色,如#1C1C1C),您将在回复中保留颜色!

© www.soinside.com 2019 - 2024. All rights reserved.