css - Outlook 中的样式问题

标签 css

我在 Outlook 中有一封邮件,它具有 Html 布局并在样式标签中定义了一些样式。当我在 IE 中打开 Outlook 并打开邮件时,它工作正常并显示正确的布局。但是,当我在 Firefox 中使用它时,样式部分不起作用。当我查看源代码时,我看不到 Style 标签。

最佳答案

众所周知,样式标签不受 Outlook 和其他 HTML 电子邮件客户端的支持。

惯例是为富电子邮件使用内联 CSS。

看看这个很棒的概述:Style in E-Mail

mail readers have far greater diversity than browsers and support of HTML ranges from none to limited CSS. While a few of the newest mail readers might support CSS, its almost always safest to stay with very conservative (old) markup. HTML for emails going to the overall web should be written in HTML3.2 with limited use of CSS1.

Design your HTML with the following guidelines:

  • Use HTML3.2 DOCTYPE for all email going to non-restricted internet domains
  • If your audience is restricted to AOL, you can safely use HTML4.01 transitional or experiment with XHTML1.0
  • Validate the HTML and keep it very clean. After you validate, shred the validation with the following hacks.
  • Use CSS1 and extremely limited CSS2. If NN4.7 can parse it, it's probably safe. Otherwise: TEST.

关于css - Outlook 中的样式问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2462582/

相关文章:

css - Bootstrap : Is there a way to get a tighter layout?

css - 用不透明度覆盖 CSS 规则背景颜色

css - 关于网站 CSS 布局编码的问题

html - 使 div 背景图像响应及其内容

jquery - 将 Bootstrap 表行重置为 "stripe"样式

javascript - 如何为链接触发的过渡设置动画

css - Angular Material mat-sidenav 宽度比 CSS 中设置的宽度小 1 个像素

javascript - 如何在 AngularJS 中指定基本 url 中的相对路径

javascript - 在javascript中引用子元素

jquery - 不能在 html 标题中用阿拉伯语写