HTML 邮件前置未隐藏
HTML mail prehead not hidden
我在我的 HTML 邮件中添加了一个前置文本,但它没有隐藏在 Outlook 中。我将 prehead 样式添加为内联样式,并将其包含在 head 样式标签中。
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{% block title %}{% endblock %}</title>
<style>
.preheader {
color: #f6f6f6;
display: none !important;
max-height: 0;
max-width: 0;
opacity: 0;
visibility: hidden;
mso-hide: all;
overflow: hidden;
font-size: 0;
line-height: 1px;
}
</style>
</head>
<body style="background-color: #f6f6f6; font-family: 'Verdana', sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 10px; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
<div class="preheader" style="color: #f6f6f6; display: none !important; max-height: 0; max-width: 0; opacity: 0; visibility: hidden; mso-hide: all; overflow: hidden; font-size: 0; line-height: 1px;">
{% block preheader %}{% endblock %}
</div>
...
为什么不隐藏预报头?它会一直呈现,就好像应用了 none 个样式一样。
提前致谢
显然预报头中的内容太长了。限制字符数解决了我的问题。
我在我的 HTML 邮件中添加了一个前置文本,但它没有隐藏在 Outlook 中。我将 prehead 样式添加为内联样式,并将其包含在 head 样式标签中。
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{% block title %}{% endblock %}</title>
<style>
.preheader {
color: #f6f6f6;
display: none !important;
max-height: 0;
max-width: 0;
opacity: 0;
visibility: hidden;
mso-hide: all;
overflow: hidden;
font-size: 0;
line-height: 1px;
}
</style>
</head>
<body style="background-color: #f6f6f6; font-family: 'Verdana', sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 10px; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
<div class="preheader" style="color: #f6f6f6; display: none !important; max-height: 0; max-width: 0; opacity: 0; visibility: hidden; mso-hide: all; overflow: hidden; font-size: 0; line-height: 1px;">
{% block preheader %}{% endblock %}
</div>
...
为什么不隐藏预报头?它会一直呈现,就好像应用了 none 个样式一样。
提前致谢
显然预报头中的内容太长了。限制字符数解决了我的问题。