Outlook Web 应用程序中的 html 电子邮件中断
我正在建立一个 html 电子邮件。它在 Outlook 2003、Outlook 2007、hotmail、gmail、yahoo 中看起来很好,但在 Outlook Web 应用程序中,行之间有中断。有人在使用 Outlook Web App 时遇到过这些问题吗?
我的图像上有显示块,但看起来它们被删除了。
I am building a html email. it looks fine in outlook 2003, outlook 2007, hotmail, gmail, yahoo but in outlook web app has breaks between the rows. has anyone had these issues with outlook web app?
i have display block on the images but it looks like they get stripped out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
通过将元素包装在
EG:
中已修复
,但需要对所有损坏的元素进行处理
This was fixed by wrapping the elements in
<span style="display:block"></span>
E.G:
becomes
but needs doing on all broken elements
各种样式都被删除,因此内联样式不适用于 OWA 中的图像。
下面是蜥蜴比尔所指内容的一个简单示例:
< /code>
如果没有上面的代码,可能看起来额外的填充/边距正在表和表行/列之间创建空间......基本上就是将您带到此页面的问题。
Various styling is being stripped, so inline-styling will NOT work with images in OWA.
Here's a simple example of what Bill the Lizard was referring too:
<span style="display:block"><img src="myFancyImage.gif"/></span>
Without the above code it may look like extra padding/margin is creating space between tables and table rows/columns.... basically the issue that brought you to this page.
使用这个内联CSS
Use this inline css
我遇到了同样的问题,不幸的是这些解决方案都不起作用。
无论我是否将图像包裹在 span 或 font 标签中,display:block 总是被条纹化。
最终,我发现将图像包装在具有内联宽度和高度的 DIV 中可以解决问题。我猜是因为 DIV 已经是块元素了,而且 OWA 唯一没有去掉的样式似乎是宽度和高度。
例如
I had the same problem, and unfortunately none of these solutions worked.
The display:block was always being striped out, no matter whether I wrapped the image in span or font tags.
Eventually, I found that wrapping the image in a DIV with inline width and height solved the problem. I guess because DIVs are block elements already, and it seems the only styles that OWA doesn't strip out are width and height.
e.g.
我尝试了上面的修复,但它不起作用 - 但这对我有用:
我刚刚在电子邮件代码的顶部添加了此代码。
I tried the fix above and it didn't work - but this worked for me:
I just added this code at the top of the email code.