CSS 样式在 Outlook 2010 中不起作用?
如果我在 Outlook 中使用样式,它将不起作用。
我该如何修复它?我正在谈论这个样式代码:
<div id="BodyID" Style=" word-spacing:2px; min-width:0px; min-height:0px;max-width:693px; max-height:490px; height:485px; background-color:#f4f4f4; border:1px solid #e4e4e4; font-family:Arial;">
If I use styling in my outlook, it won't work.
how can I fix it? I am talking about this style code:
<div id="BodyID" Style=" word-spacing:2px; min-width:0px; min-height:0px;max-width:693px; max-height:490px; height:485px; background-color:#f4f4f4; border:1px solid #e4e4e4; font-family:Arial;">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
不幸的是,Outlook 支持与 IE5 兼容的 HTML 大致相同的内容。这真的太可怕了。以下是有关 Outlook 中的 Word 2007 HTML 和 CSS 呈现功能的详细 MSDN 文章2007,我认为 Outlook 2010 没有太大变化。
老实说,这是我能够让 Outlook HTML 看起来像我的样子的唯一方法想要的是使用大致 HTML2 标准标签和属性来手动生成 HTML,而不是使用 CSS。一些 CSS 会渲染,但它确实是命中注定的。
Unfortunately Outlook supports something roughly equivalent to IE5 compatible HTML. It's really terrible. Here's a detailed MSDN article on the Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007, which I don't believe changed much for Outlook 2010.
Honestly, the only way I've been able to get outlook HTML to look the way I want is to hand generate the HTML using roughly HTML2 standard tags and properties and not using CSS at all. Some CSS renders, but it's really hit or miss.
也许这可以帮助 http://www.campaignmonitor.com/css/ 这是一个表,什么是支持电子邮件
编辑
不支持
min|max-width|height
Maybe this can help http://www.campaignmonitor.com/css/ It's a table, what is supported in E-Mails
edit
min|max-width|height
not supportedhttp://htmlemailboilerplate.com/
我一直使用它作为我的 HTML 电子邮件活动的基础。
yunzen 发布到 Campaign Monitor 的链接是一个很好的资源。
http://htmlemailboilerplate.com/
I've been using that as a base for my HTML email campaigns.
And the link yunzen posted to campaign monitor is a great resource.
链接到的 MSDN 文章 superlime 讲述了悲伤的故事:无论出于何种不可理解的原因,Microsoft 恢复了近 10 年来使用 Outlook2007 处理 HTML 电子邮件的方式,并且认为不适合在 2010 年修复它
。不厌其烦地为邮件用户代理领域的其余部分设计格式良好的 HTML 布局,我确实看到了一种节省的解决方法,这就是我将指导我的用户使用的方法,而不是花费我的 尝试重建古老的 HTML 的时间:
使用 Outlook 提供的在浏览器中查看选项来阅读电子邮件。这会按预期重新组装 HTML。
The MSDN article superlime linked to tells the sad story: for whatever incomprehensible reasons, Microsoft reverted nearly 10 years in their handling of HTML email w/Outlook2007, and did not see fit to fix it in 2010.
Having taken the trouble to design a well-formatted HTML layout for rest of the universe of mail user agents, I do see one saving workaround, which is what I'm going to direct my users to, rather than spend my time trying to reconstruct ancient HTML:
Use the VIEW IN BROWSER option Outlook offers for reading an email message. That re-assembles the HTML as intended.
尝试添加 3 列表格,单击下面的示例链接。
示例:链接
Try adding 3 columns table, click on the example link below.
Example: Link