【问题标题】:outlook displaying css code in email signatureOutlook 在电子邮件签名中显示 CSS 代码
【发布时间】:2018-02-01 22:41:05
【问题描述】:

想弄清楚为什么 Outlook 在我的 html 电子邮件签名上方显示我的 CSS 代码?

似乎去掉了实际的样式标签,但将代码显示为文本?

在其他电子邮件客户端中完全没问题。

有什么想法吗?

代码:

<body>
<br />
<br />
<br />
<style>
  a.link{margin:0;padding:0;border:none !important;text-decoration:none !important;}
table,tr,td,a,span{font-family: 'Avenir', Helvetica, Arial, sans-serif;}
.appleGreyLinks{color: #666666 !important; text-decoration: none;}
a[x-apple-data-detectors] {color: inherit !important;text-decoration: none !important;font-size: inherit !important;font-family: inherit !important;font-weight: inherit !important;line-height: inherit !important;}
</style>
<!--[if mso]>
<style>
    * {
        font-family: sans-serif !important;
    }
</style>
<![endif]-->
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<meta name='format-detection' content='telephone=no' />
<meta name='format-detection' content='address=no' />
<meta name='format-detection' content='email=no' />

<table width='320' id="sig" cellspacing='0' cellpadding='0' border-spacing='0' style="margin:0;padding:0;">
<tr>
    <td width="60" valign="middle" style="vertical-align:middle;width:60px;margin:0;padding:0;">
        <a href='mailto:info@...
and so on

这是电子邮件签名主要部分之前在 Outlook 中错误显示的代码...

【问题讨论】:

  • 您说的是什么类型/版本的 Outlook?
  • 因为 Outlook 有一个讨厌的习惯,就是重写东西以适应自己。在为 Outlook 编写 webmail 时,最佳做法是对所有内容使用内联样式,不要尝试使用样式标签。
  • 是的@scrappedcola 事情是那里有一些 CSS 不能内联(据我所知),苹果数据检测器的东西。如果 Outlook 忽略 CSS,但它正在积极显示它,我并不担心!太蠢了。
  • 认为我已经自己修复了它,对于任何有同样问题的人来说,似乎样式标签不在标题标签内 将样式放在这里
  • 2016 @KIKOSoftware

标签: html css email outlook signature


【解决方案1】:

您的 CSS 样式位于电子邮件的正文中。

所有非内联 CSS 都应该移到头部

<head>
 <style>
   *YOUR CSS HERE*
 </style>
</head>
<body>
*YOUR CONTENT HERE*....

【讨论】:

    猜你喜欢
    • 2015-02-05
    • 2012-06-27
    • 2013-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-30
    • 2015-05-11
    相关资源
    最近更新 更多