pub*_*umj 25 html css email-client newsletter html-email
<td width="110" align="center" valign="top" style="color:#000000;">
<a href="https://example.com" target="_blank"
style="color:#000000; text-decoration:none;">BOOK NOW
</a>
</td>
Run Code Online (Sandbox Code Playgroud)
我使用此代码在我的HTML电子邮件中创建一个链接.在浏览器和Outlook中,它运行良好,但在GMail,Hotmail和ymail中,它显示了带下划线的链接.
任何人都可以帮我摆脱这个吗?
小智 29
<a href="#" style="text-decoration:none !important; text-decoration:none;">BOOK NOW</a>
Run Code Online (Sandbox Code Playgroud)
Outlook将删除带有!important
标记的样式,留下常规样式,因此没有下划线.该!important
标签将在统治这个基于Web的电子邮件客户端的默认样式,从而不留下划线.
小智 8
我看到这已经得到了回答; 但是,我觉得这个链接提供了各种电子邮件客户端支持的格式的适当信息.
http://www.campaignmonitor.com/css/
值得注意的是,GMail和Outlook是格式化HTML电子邮件的最挑剔的两种.
使用!important
文本装饰规则。
<a href="#" style="text-decoration:none !important;">BOOK NOW</a>
Run Code Online (Sandbox Code Playgroud)
小智 5
经过半天的研究(以及这个问题提出两年后),我相信我已经找到了一个全面的答案。
<a href="#"><font color="#000000"><span style='text-decoration:none;text-underline:none'>Link</span></font></a>
Run Code Online (Sandbox Code Playgroud)
(您需要链接内跨度上的 text-underline 属性和字体标签来编辑颜色)
Windows Mail 似乎完全忽略了内联text-decoration
标记,但为我解决这个问题的方法是将其添加到头部:
<!--[if (mso)|(mso 16)]>
<style type="text/css">
body, table, td, a, span { font-family: Arial, Helvetica, sans-serif !important; }
a {text-decoration: none;}
</style>
<![endif]-->
Run Code Online (Sandbox Code Playgroud)
def*_*u1t -3
你应该写这样的东西。
<a href="#" style="text-decoration:none;">BOOK NOW</a>
Run Code Online (Sandbox Code Playgroud)