本文共 1560 字,大约阅读时间需要 5 分钟。
For those of you who design and develop HTML emails for Outlook 2007 and 2010, you already know that you are bound by tables and you have very limited CSS support. What you might not realize is that these two email clients convert your code from something legible into a seemingly foreign Microsoft language.
今天做邮件模板,发现IE下面显示的跟outlook显示的不一样。
[@more@]One of the more critical conversions that you should be aware of is that Outlook 2007 and 2010 will often move your CSS from div's and headings into nested paragraph and spans. Sometimes, it keeps the outer container, other times it eliminates it entirely.
For example this:
Will get converted to:
p
{mso-style-noshow:yes;mso-style-priority:99;mso-margin-top-alt:auto;margin-right:0in;mso-margin-bottom-alt:auto;margin-left:0in;mso-pagination:widow-orphan;font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:"Times New Roman";mso-fareast-theme-font:minor-fareast;}
As you can see, this conversion moved our CSS from its original box element container to an inline SPAN element and the padding was ignored.
One work-around is to avoid padding in block element containers and use margins instead.
Note: I did not include the "margin" nor "margin-top" properties in this example because they are not supported by Hotmail.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/219138/viewspace-1055090/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/219138/viewspace-1055090/