Outlook免责声明HTML

huangapple go评论101阅读模式
英文:

Outlook Disclaimer HTML

问题

以下是翻译好的部分:

我正在尝试为外部消息制作免责声明。但我在Outlook中的HTML渲染方面遇到了问题。通过w3schools进行测试时,它看起来很好,如下所示:

然而,在Outlook中看起来像这样:

这是我正在使用的代码:

英文:

I am trying to make a disclaimer for external messages. I am having trouble with how Outlook is rendering the HTML though. Testing it via w3schools, it appears fine, as shown here:Outlook免责声明HTML

Though, in Outlook it looks like this:
Outlook免责声明HTML

Here is the code I am using:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

&lt;div style=&quot;background-color:#6385ce; border:3.5px solid #1e3679; padding:.5em; &quot;&gt;
  &lt;span style=&quot;font-size:12pt;  font-family: &#39;Cambria&#39;,&#39;times new roman&#39;,&#39;garamond&#39;,serif; color:#FFFFFF;&quot;&gt;&lt;b&gt;CAUTION:&lt;/b&gt;&lt;/span&gt;
  &lt;span style=&quot;font-size:10pt; font-family: &#39;Cambria&#39;,&#39;times roman&#39;,serif; color:#FFFFFF&quot;&gt;This email originated from outside. Do not click on links, open attachments, or reply unless you recognize the sender as well as the domain. Follow guidelines for validating payment information with Wires, ACH, etc.
  &lt;/span&gt;
  &lt;/div&gt;

<!-- end snippet -->

Any idea what I can do to fix this? I have been messing with different styles but can't seem to get it to work in outlook.

答案1

得分: 0

表格标签在Outlook中比div更安全。
而且有一些Outlook规则使用整数、一个字体系列等等。

<table style="background:#6385ce; border:4px solid #1e3679; color:#fff; font-family: Cambria; font-size:10pt;">
  <tbody>
    <tr>
      <td style="padding:8px;">
        <strong style="font-size:12pt;">CAUTION:</strong> This email originated from outside. Do not click on links, open attachments, or reply unless you recognize the sender as well as the domain. Follow guidelines for validating payment information with Wires, ACH, etc.
      </td>
    </tr>
  </tbody>
</table>
英文:

Table tag is more safe than div in outlook.
and there's some outlook rule that use whole number, one font famly... etc.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

  &lt;table style=&quot;background:#6385ce; border:4px solid #1e3679; color:#fff; font-family: Cambria; font-size:10pt;&quot;&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td style=&quot;padding:8px;&quot;&gt;
          &lt;strong style=&quot;font-size:12pt;&quot;&gt;CAUTION:&lt;/strong&gt; This email originated from outside. Do not click on links, open attachments, or reply unless you recognize the sender as well as the domain. Follow guidelines for validating payment information with Wires, ACH, etc.
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;

<!-- end snippet -->

huangapple
  • 本文由 发表于 2023年6月8日 23:03:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76433209.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定