我正在设计一个新的电子邮件签名,每次我从苹果邮件中转发或回复该电子邮件时,它都会变蓝。
我可以在苹果邮件中看到它是蓝色的,但在gmail的f.I.中也可以看到。因此,这不是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>
到目前为止我尝试了什么:
- 在
a
标记周围和内部创建spans
- 将
x-apple-data-detectors
设置为true和false - 也为其他链路类型设置
<meta content="email=no" name="format-detection">
- 将链接文本设置为仅文本,如";点击这里";但他们仍然得到认可和改造
我找不到太多关于x-apple-data-detectors
的信息,不知道是否有更好的方法来调试它们。
非常感谢您的帮助。
在尝试了上述所有步骤后,仍然一无所获。作为一个可怕的变通方法,我发现添加一个引用"#"将覆盖蓝色文本。
<a target="_blank" class="bluelinks" style="font-size: 16px; color: rgb(0, 0, 0); text-decoration: none;" href="#">before midnight on July 4th</a>
代码是否可能在链接上获取活动状态?你试过在活动状态下设置颜色吗?
尝试将其添加到<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;">
我花了一个小时研究这个问题,刚刚发现Mac上的苹果邮件只将#000000链接更改为蓝色。如果你使用另一种颜色(例如,不同的深色,如#1C1C1C(,你会在回复时保留你的颜色!