html - outlook 在电子邮件签名中显示 css 代码

标签 html css email outlook signature

想弄明白为什么 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

最佳答案

您在电子邮件的正文中有您的 CSS 样式。

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

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

关于html - outlook 在电子邮件签名中显示 css 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48572940/

相关文章:

css - HTML5/CSS 如何编写侧边栏高度以自动匹配包装高度?

javascript - 有没有办法在使用 AJAX 的父级之前在 div 中加载隐藏的 div?

javascript - 两次循环后停止 W3 Css-Javascript slider

html - 显示图像时的 Bootstrap 布局问题

ios - 发送带有相机图像附件的邮件

javascript - jQuery:如何为多组单选按钮重复使用相同的功能

javascript - 尝试验证电子邮件时未显示类名

html - 使用 LibreOffice 在终端中从 Mac 命令将 HTML 转换为 PDF?

email - 子域在发送电子邮件时是否保护域的声誉?

java - 保存电子邮件附件