【问题标题】:HTML email links in Android Outlook app turning blueAndroid Outlook 应用程序中的 HTML 电子邮件链接变为蓝色
【发布时间】:2017-07-03 04:19:34
【问题描述】:

我的 html 时事通讯中有两个链接,无论我做什么,它们都会变成默认的蓝色。任何人都知道任何修复。

<span>、<font> 和 <strong> 标签是我读过的所有修复程序,但似乎都没有工作。

Blue Links

a {font-family:'Roboto', sans-serif, Helvetica, Arial !important; font-size:16px; color: #EF8152 !important;; font-weight:300; text-decoration: none;}
<a href="#" style="margin:10px 0px 40px 0px; font-family:'Roboto', sans-serif, Helvetica, Arial !important; font-size:1em; color: #EF8152 !important; color: #EF8152; font-weight:300; line-height:1.0em; font-size:1em; text-align:center;">
  <span style="color:#EF8152 !important; color: #EF8152;">
    <font color="#EF8152">
      <strong style="text-decoration: none; color: #EF8152 !important; color: #EF8152;">
        View in web browser.
      </strong>
    </font>
  </span>
</a>

【问题讨论】:

  • 你有一个a:visited 在某个地方接管吗?您也可以尝试将a 更改为a:link
  • @Fred -ii- 不。这是最奇怪的事情,我一辈子都想不通。
  • 但是,您的 html 中有一些内联样式,这可能会产生 advserse 效果和 span 中的其他样式。那或检查您的设置;也许您的手机(outlook 应用)中的某些东西正在覆盖它。
  • 您发布的代码运行良好,我认为您的代码中有另一个类正在覆盖您的样式
  • @Fred -ii- 你指的是 style="color:#EF8152 !important; color: #EF8152;" 吗?这是我读到的另一个修复方法,但也没有用。

标签: android html css outlook html-email


【解决方案1】:

这是 Outlook 应用程序为链接添加样式的 bc。这也是 Windows 10 上的一个问题,我相信 Comcast 电子邮件。

尝试在您的 CSS 中添加此代码

a:link, span.MsoHyperlink {
mso-style-priority:100 !important;
color:#000000 !important;
color:#000000;
text-decoration:none !important;
}

【讨论】:

  • 在 HTML 电子邮件中多次与此作斗争后,最后说在 Windows 上搞砸了 Outlook 终于做到了。谢谢!
【解决方案2】:

您不应该在内联 css 中需要所有这些额外的标签或 !important 引用。像这样的东西应该工作,虽然我觉得你已经尝试过了:

<a href="#" style="margin:10px 0px 40px 0px; font-family:'Roboto', sans-serif; color: #EF8152; font-weight:300; line-height:15px; font-size:15px; text-align:center; font-weight: bold; text-decoration: none;">
    View in web browser.
</a>

另外两件事要尝试:

  1. 去掉a 在&lt;head&gt; 中的样式。
  2. 如果您要内联任何 CSS,请将其关闭/不要这样做。

如果此仍然不起作用,则有 chatter about this being a bug in Outlook app,Android 和 iOS 应用程序都被提及。

【讨论】:

  • 对于普通的 Web 编码,是的,您不会使用内联样式,但对于 HTML 电子邮件,您必须为较旧和一些较新的电子邮件客户端内联大部分内容。这似乎违反直觉,而且已经过时,但这就是电子邮件现在的样子。此外,移动媒体查询通常需要 中的样式,但大多数桌面电子邮件客户端会忽略这些样式。
猜你喜欢
  • 1970-01-01
  • 2022-06-28
  • 2018-11-15
  • 2013-08-19
  • 2016-05-16
  • 2011-08-27
  • 1970-01-01
  • 2013-02-04
  • 2017-09-04
相关资源
最近更新 更多