题
我有一个HTML电子邮件,可以在每个客户端正确工作 除了 Outlook 2003,链接具有强调(即使 text-decoration: none;
)和 font-size
变化较小。
摘录来自代码:
<td valign="top" align="left" style="line-height: 31px; font-size: 31px;">
<font face="Arial, Helvetica, sans-serif" size="3" color="#6b565d" style="line-height: 60px; font-size: 62px;"><strong>25% off</strong></font>
</td>
示例链接:
<font face="Arial, Helvetica, sans-serif" size="3" color="#ffffff" style="line-height: 16px; font-size: 22px;"><a href="<squeeze.attribute.link.story01_text>" title="Book your sale room now" style="color: #ffffff; text-decoration: none; font-size:22px; background-color: #b50f18;"><font color="#ffffff"><strong>Mooo, I'm some text >></strong></font></a></font>
还有这个 font-size
更改为11或12px。
有任何想法吗?
解决方案
您的代码中的大量标记。我刚刚在发送电子邮件时尝试了Outlook 2010的标记的外观 - 因为在将邮件发送到Outlook 2003时,没有下划线无调的链接。没有进一步的ADO:
<a href="http://example.org">
<span style='text-decoration:none;'>My Link Text not underlined</span>
</a>
要注意的重要事项:它使 span
在样式的链接中。没有用法 <font>
任何。
Outlook具有可自动完成超链接的不错的“功能” - AFAIK这仅适用于您键入的文本,但值得一试,也许客户正在自动完成您的链接以被下划线? (真的只是猜测)。有一个自动完成链接的热五个 这里 (仍然需要摆弄注册表并创建一个名称的dword DisableAutoUrlCompletion
在 HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences
).
仅出于完整性,在Outlook 2010中发送了一封非常简单的电子邮件的完整电子邮件主体,在Outlook 2003(相同的字体尺寸,没有下划线 - 都相同)。 [请记住 - 在那里的Microsoft“垃圾”的很多,即使使用了Arial,也不需要像Calibri样式一样
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o=
"urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns=
"http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="Microsoft Word 14 (filtered medium)" />
<style type="text/css">
/*<![CDATA[*/
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
-->
/*]]>*/
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<title></title>
</head>
<body lang="EN-US" link="blue" vlink="purple" xml:lang="EN-US">
<div class="WordSection1">
<p class="MsoNormal"><span lang="DE" style=
'font-size:14.0pt;font-family:"Arial","sans-serif";color:black' xml:lang=
"DE"><a href="http://example.org/"><span style=
'color:black;text-decoration:none'>test</span></a></span></p>
</div>
</body>
</html>
其他提示
@neurofluxation:尝试 -
摘录:
<td valign="top" align="left">
<span style="color: #6b565d; font-size: 62px; line-height: 60px;"><strong>25% off</strong></span>
</td>
对于链接:
<a href="<squeeze.attribute.link.story01_text>" title="Book your sale room now" style="background-color: #b50f18; color: #ffffff; font-size: 22px; line-height: 16px; text-decoration: none;"><strong>Mooo, I'm some text >></strong></a>
这也是跨多种电子邮件客户端的CSS支持的方便指南: http://www.campaignmonitor.com/css/
不隶属于 StackOverflow