html-email - 为什么outlook.com 移动文本下划线?
问题描述
在我的 html 电子邮件中,我有两个带下划线的白色链接,除了 Outlook.com/Office 365 之外,这在任何地方都有效。在这些网站上,链接没有下划线,但其他一些不相关的非链接文本是?!
此处链接的下划线:
<table width="100%" border="0" cellspacing="0" cellpadding="15" bgcolor="#001342">
<tr>
<td width="100%" align="center" valign="middle" style="font-family: Arial, Helvetica, sans-serif; font-size: 18px; line-height: 24px; color: #ffffff;">
<p>Register onto <span style="color: #ffb718;">X</span> by completing the short form <a href="#" style="color: #ffffff; text-decoration: underline!important;">here</a></p>
</td>
</tr>
</table>
Appears to be getting applied here instead:
<tr>
<td width="50" align="left" valign="middle">
<img src="images/icon-clipboard.gif" alt="" width="40" height="40" border="0">
</td>
<td class="list-text" align="left" valign="middle" style="font-family: Arial, Helvetica, sans-serif; font-size: 26px; line-height: 30px; color: #001342;">
<p style="text-decoration: none!important;"><span style="color: #ffb718; font-weight: bold;">1.</span> REAL-TIME AVAILABILITY</p>
</td>
</tr>
您可以在此处的屏幕截图中看到问题http://kinocreative.uk/img/
我尝试了各种跨度、hrefs 和 text-transform 的组合来解决这个问题,但无济于事。
完整的电子邮件代码在这里:https ://pastebin.com/PfNmTeZc
解决方案
Outlook.com 和 Office 365 不喜欢虚拟链接。如果您包含它们,您会发现一些小的不一致,例如您看到的基于 html 的按钮背景颜色扩散到按钮下方的内容的背景。
这是一个简单(但令人讨厌)的问题,只需简单的修复即可。我使用的一种技术是在 # 之后添加句号,如下所示:
<a href="#." ...></a>
或者添加一个像http://www.example.com这样的虚拟 url也可以,甚至在测试时添加你的最终 url。
推荐阅读
- assembly - nasm 键盘驱动程序 I/O
- vuetify.js - 如何使用 Vuetify 将 v-card 放在页面中心
- javascript - React Js 中的路由
- c# - 如何使用 TOptions 在 .net core 3.1 中配置和注入 JwtOptions?
- permissions - 我可以授予管道权限,以便它可以使用 API 读取 Azure Devops 中不同项目的信息吗?
- javascript - React 中的重新渲染过多
- powershell - Powershell:Get-Process 不会枚举所有进程模块
- mysql - 访问远程数据库时连接 ETIMEDOUT 错误,即使端口 3306 已打开
- lua - lua 字符串索引表并解压
- javascript - 将 data:image/gif 转换为二进制 PNG 或 JPEG 的最佳方法?