【问题标题】:Gmail blue links in email电子邮件中的 Gmail 蓝色链接
【发布时间】:2018-11-15 06:06:24
【问题描述】:

我不知道如何更改 Gmail 添加到我尝试编码的电子邮件中的这些蓝色链接。

我已经在网上搜索并实施了他们的修复,但无济于事。

这是我的代码。

<th class="small-12 large-6 last columns text-right show-for-large" valign="middle" style="Margin:0 auto;color:#fff;font-family:'Open Sans',sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0 auto;padding:0;padding-bottom:16px;padding-left:8px;padding-right:16px;padding-top:16px;text-align:right;width:274px">
    <a href="https://website.com/wealth" style="Margin:0;color:#fff!important;font:inherit;font-family:'Open Sans',sans-serif;font-size:10px!important;font-weight:400;line-height:1.75;margin:0;padding:0;pointer-events:none;text-align:left;text-decoration:none!important">​Wealth</a>&nbsp;&nbsp; 
    <a href="https://discover.website.io/" style="Margin:0;color:#fff!important;font:inherit;font-family:'Open Sans',sans-serif;font-size:10px!important;font-weight:400;line-height:1.75;margin:0;padding:0;pointer-events:none;text-align:left;text-decoration:none!important">​News</a>&nbsp;&nbsp; 
    <a href="https://website.com/contact" style="Margin:0;color:#fff!important;font:inherit;font-family:'Open Sans',sans-serif;font-size:10px!important;font-weight:400;line-height:1.75;margin:0;padding:0;pointer-events:none;text-align:left;text-decoration:none!important">​Contact Us</a>&nbsp;&nbsp;
</th>

【问题讨论】:

  • 奇怪的是,它只发生在其中一个链接上,而其他链接似乎没问题。也许还有其他原因导致这种情况?像插件或浏览器上安装的东西?
  • @Vega the Margin 显然是对前景的修复。
  • @AlonEitan 我试过在两个不同的浏览器和相同的问题上查看它。
  • @AlonEitan 感谢您的帮助。谢谢老兄。

标签: css html-email zurb-ink


【解决方案1】:

我在链接周围添加了一个&lt;span&gt; 标签,以使其按照 Alon 在 cmets 中的建议正常工作。

【讨论】:

  • 当计时器到期时,请务必将此标记为已接受的答案(单击复选标记),以便其他人知道它解决了您的问题!
【解决方案2】:

您需要更改 6 位数值的颜色,我认为任何电子邮件客户端都不支持 3 位颜色。除了colortext-decoration 之外,我还将删除a 标签上的所有内联样式,同时删除!important。字体样式将全部继承自th

我在所有模板中使用的整体 css 修复如下。您还需要将 id="body" 添加到您的 &lt;body&gt; 元素。

    u+#body a,
    #MessageViewBody a {
      color: inherit;
      text-decoration: none;
      font-size: inherit;
      font-family: inherit;
      font-weight: inherit;
      line-height: inherit;
    }

#MessageViewBody a 也会从三星邮件中删除蓝色链接,但无需将该 ID 添加到您的代码中。一个方便的修复。)

【讨论】:

  • 谢谢,我试试看。
【解决方案3】:

因此,对于 gmail,为了获取超链接锚 ( ) 的实际样式,您必须使用以下内联 css 来设置颜色并删除下划线: style="color: #FF0000; text-decoration:none; cursor:text; pointer-events: none;"

这是一个完整的标签的样子: &lt;a href="http://www.google.com/" style="color: #FF0000; text-decoration:none; cursor:text; pointer-events: none;"&gt;Click here to go to Google&lt;/a&gt;

截至回答日期:19/09/2019

【讨论】:

    猜你喜欢
    • 2018-09-23
    • 1970-01-01
    • 1970-01-01
    • 2017-09-04
    • 2022-06-28
    • 2015-02-01
    • 1970-01-01
    • 2019-03-08
    • 2017-07-03
    相关资源
    最近更新 更多