我在 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/