问题描述
我在作为电子邮件发送的 html 内容中有以下 dom 结构.
I have a following dom structure in html content I am sending as email.
<a href="http://content.mindmatrix.net/email/814xjqjmpj5r/b59tqx7tzz2x7"
target="_new">
<span style='text-decoration:none;text-underline:none'>
<img border=0 id="_x0000_i1026"
src="http://dev.mindmatrix.net/page/e7c9cf53-bae8-4024-a561-355f950cb26b/635246986810000000/original.jpeg?userid=cozmwz91irkm1"
style='border-bottom-color:black;border-bottom-style:solid;border-bottom-width:
1px;border-left-color:black;border-left-style:solid;border-left-width:1px;
border-right-color:black;border-right-style:solid;border-right-width:1px;
border-top-color:black;border-top-style:solid;border-top-width:1px;
height:150px;width:120px'>
</span></a>
我将样式 height:150px;width:120px
赋予图像以使其成为缩略图大小.此图像的实际高度和宽度非常大.问题是,当邮件进入 Outlook 收件箱时,不会采用这种样式.所以我的问题是 -
I am giving style height:150px;width:120px
to image for making it of size thumbnail. Actual height and width of this image is very large. Problem is, this style is not taken when mail goes in outlook inbox. So my questions are -
1)如何让 css 用于设置高度和宽度.
1)How can i make the css work for setting height and width.
2) 图像在 Windown live mail 中显得模糊.我不确定当我成功固定高度和宽度的样式时,它是否会持续存在.那么我该如何解决这个问题
2) Image appears blur in Windown live mail. I am not sure whether it will persist in outlook when i will succeed in fixing style of height and width. so how can i fix this
推荐答案
将宽度和高度放在单独的属性中,没有单位:
Put the width and height in separate attributes, with no unit:
<img style="margin: 0; border: 0; padding: 0; display: block;"
src="images/img.jpg" width="120" height="150">
另一种选择:
<!--[if gte mso 9]>
<style type="text/css">
img.header { width: 600px; } /* or something like that */
</style>
<![endif]-->
这篇关于Outlook 邮件中未采用图像样式的高度和宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!