Html Outlook 2007中TD的背景图像
有人告诉我,使用表格是发送电子邮件的最佳方式,尽管这是发送电子邮件的两倍困难。我已经在表格中设置了电子邮件,用Html Outlook 2007中TD的背景图像,html,css,email,outlook-2007,Html,Css,Email,Outlook 2007,有人告诉我,使用表格是发送电子邮件的最佳方式,尽管这是发送电子邮件的两倍困难。我已经在表格中设置了电子邮件,用background=”“属性设置了所有需要背景的单元格,并在标记中使用CSS来覆盖我的基础。车身背景在外观上显示良好,但TD背景不显示。我也尝试过使用,但也不起作用。我读到Outlook 2007不支持背景图像,将来也不会支持,我想一定有办法解决这个问题。: 您可能已经在前面阅读了有关我们解决问题的方法。这不仅需要在整个HTML页面中添加背景图像,还需要将所有内容包装到一个应用了背景图
background=”“
属性设置了所有需要背景的单元格,并在
标记中使用CSS来覆盖我的基础。车身背景在外观上显示良好,但TD背景不显示。我也尝试过使用,但也不起作用。我读到Outlook 2007不支持背景图像,将来也不会支持,我想一定有办法解决这个问题。:
您可能已经在前面阅读了有关我们解决问题的方法。这不仅需要在整个HTML页面中添加背景图像,还需要将所有内容包装到一个应用了背景图像的表中。但是,此方法有一个限制,即虽然可以将背景图像应用于整个表,但不能将背景图像应用于单个表单元格。感谢我们的一位明星客户,我们已经展示了一个小代码,它不仅允许您,而且也适用于大多数主要的电子邮件客户端
这项技术。。。强制在Outlook 2003/2007/2010中显示背景图像
我发了很多HTML电子邮件,发现如果不使用一些黑客,背景图片是不合适的 始终在TD中为您的图像使用
标记。如果要在图像顶部显示文本,请将其包含到图像中,并在img标记的alt属性中重复该文本
你可以看到一个。它使用很少的CSS和img标记,而且几乎在所有电子邮件客户端中都能完美呈现
不幸的是,对于HTML电子邮件,我们的能力有点有限,但有一些方法可以解决:)
希望获得帮助:)在Outlook 2007中签出此链接以获取受支持的HTML和CSS标记: MS还在上面的URL中为Outlook 2007提供了一个HTML/CSS验证工具。这至少可以为您提供一种测试方法
我发现,当涉及HTML电子邮件时,“少即是多”——简单的布局,简单的技术。由于每个电子邮件客户端都会有所不同,“简化”它是保证最广泛访问的唯一方法。幸运的是,您可以使用一些格式调整来解决这一问题。这样做的好处是,使HTML电子邮件Outlook 2007兼容可以减少它最终进入收件人的垃圾邮件文件夹的可能性。不利的一面是,你可能不得不改变你处理电子邮件格式化部分的方式,从而影响你创意的外观和感觉。下面是要注意的关键项目列表,以及与Outlook 2007兼容的可能替代方案
- 背景图像–背景图像将不会显示在Outlook 2007中。这会在你的电子邮件中留下一个很大的、意想不到的空白。您应该避免完全使用背景图像。只要可能,就应该使用内联图像标记。如果您觉得必须使用背景图像,请设置适当的背景颜色以填充可能丢失的图像。如果文本覆盖在背景图像上,则可以编辑图像以包含文本,并对任何链接使用图像贴图
- 部门标记–Outlook 2007不完全支持“Div”标记。省略了一些更常用的属性:float、clear、position和padding。如果没有这些属性,使用div标记进行定位几乎是不可能的。相反,你应该用一个标准的表格来控制电子邮件的位置
- 表单–Outlook 2007不支持表单。Outlook 2007收件人将无法提交电子邮件中嵌入的任何表单。如果您希望为收件人提供填写表单的选项,请在电子邮件中放置指向该表单在线版本的链接
- Flash和JavaScript–建议您不要尝试在HTML电子邮件上使用Flash或JavaScript,因为它们在电子邮件浏览器(包括Outlook 2007)中不受支持,而且一些过滤器会标记包含Flash或JavaScript代码的电子邮件。此外,大多数电子邮件阅读器将自动禁用此内容作为安全措施
- 带图像的项目符号列表–虽然完全支持有序列表和无序列表,但不支持将图像用作项目符号而不是标准项目符号的列表。如果您需要使用图像作为项目符号,一种可能的解决方案是将列表放入一个两列表格中,使用左手列放置项目符号
- 动画GIF–动画GIF将不会在Outlook 2007中设置动画。将显示图像,但仅显示动画的第一帧
- Alt标记-也不支持Alt标记。这是打开电子邮件时图像未加载时显示的文本。但是,大多数电子邮件阅读器都支持alt标记,在Outlook 2007兼容的电子邮件中使用alt标记不会产生任何不利影响(除非它们不会显示),因此,如果您愿意,您可以继续在电子邮件中包含这些标记
- 表定义—正如我们在上面详细介绍的,Outlook 2007使用Microsoft®Word呈现HTML电子邮件,这对额外的
或
标记非常敏感,并且不能很好地调整大小不合适的表。以前的Outlook版本会在Internet Explorer中打开电子邮件,这对于糟糕的表定义是非常宽容的。您应该确保表定义正确,并且放置在表中的数据正确符合定义的表宽度
在您想要的bg图像中放置另一个表
并执行此操作
<td> < !-- this is table where you want to set bg image -->
< table background="myimg.jpg" style="background-repeat:no-repeat;" >
here goes content
</table>
</td>
<!--这是您要设置bg映像-->
内容来了
这将覆盖整个系统,在outl中工作完美
<td background="http://www.thiespublishing.com/oneimage.gif" height="402" width="600" bgcolor="#cccccc">
<!--[if gte mso 9]>
<v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style='behavior: url(#default#VML); display:inline-block;position:absolute; height:402px; width:600px;top:0;left:0;border:0;z-index:1;' src="http://www.thiespublishing.com/oneimage.gif"/>
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style='behavior: url(#default#VML); display:inline-block;position:absolute; height:407px; width:610px;top:-5;left:-10;border:0;z-index:2;'>
<div>
<![endif]-->
<!-- This is where you nest a table with the content that will float over the image -->
<table width="600" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="600" height="402" valign="top">
Insert content here, including additional nested tables.
</td>
</tr>
</table>
<!-- This ends the nested table content -->
<!--[if gte mso 9]>
</div>
</v:shape>
<![endif]-->
</td>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style>
v:* { behavior: url(#default#VML); display: inline-block; }
</style>
</head>
<body>
<center>
<table width="100%" height="20">
<tr>
<td bgcolor="#dddddd" style="background-image:url('http://placekitten.com/g/500/300');background-repeat:no-repeat;background-position:center;" background="http://placekitten.com/g/500/300" width="100%" height="300">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:300px;">
<v:fill type="frame" src="http://placekitten.com/g/500/300" color="#ffffff" />
</v:rect>
<![endif]-->
</td>
</tr>
<tr>
<td bgcolor="#33cc99">
<table border="0" cellpadding="5" cellspacing="0"><tr><td height="5"><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr></table></td></tr></table>
</td>
</tr>
<tr>
<td bgcolor="#ffff99" style="background-image:url('http://placekitten.com/g/500/300');background-repeat:no-repeat;background-position:center;" background="http://placekitten.com/g/500/300" width="100%" height="300">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:300px;">
<v:fill type="frame" src="http://placekitten.com/g/500/300" color="#ffffff" />
</v:rect>
<![endif]-->
</td>
</tr>
</table>
</center>
</body>
</html>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style>
v:* { behavior: url(#default#VML); display: inline-block; }
</style>
</head>
<body>
<center>
<table width="100%">
<tr>
<td bgcolor="#dddddd" style="background-image:url('http://placekitten.com/g/500/300');background-repeat:no-repeat;background-position:center;" background="http://placekitten.com/g/500/300" width="100%" height="300">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:300px;">
<v:fill type="tile" src="http://placekitten.com/g/500/300" color="#ffffff" />
</v:rect>
<![endif]-->
</td>
</tr>
</table>
</center>
</body>
</html>
<table width="600" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
<tr>
<td style="width: 300px; height: 80px; background-image: url('http://placekitten.com/g/300/80');">
<!--[if gte mso 9]>
<v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 300px; height: 80px; top: 0; left: 0; border: 0; z-index: 1;' src="http://placekitten.com/g/300/80" />
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 300px; height: 80px; top: -5; left: -10; border: 0; z-index: 2;'>
<div>
<![endif]-->
<table width="300" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tr>
<td height="80" align="center" valign="top" style="color:#ffffff;font-size:20px;">
<span>Text</span>
</td>
</tr>
</table>
<!--[if gte mso 9]>
</div>
</v:shape>
<![endif]-->
</td>
<td style="width: 100px; height: 80px; background-image: url('http://placekitten.com/g/100/80');">
<!--[if gte mso 9]>
<v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 100px; height: 80px; top: 0; left: 0; border: 0; z-index: 1;' src="http://placekitten.com/g/100/80" />
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 100px; height: 80px; top: -5; left: -10; border: 0; z-index: 2;'>
<div>
<![endif]-->
<table width="80" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tr>
<td height="80" align="center" valign="top">
<span>Text</span>
</td>
</tr>
</table>
<!--[if gte mso 9]>
</div>
</v:shape>
<![endif]-->
</td>
<td style="width: 200px; height: 80px; background-image: url('http://placekitten.com/g/200/100');">
<!--[if gte mso 9]>
<v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 200px; height: 80px; top: 0; left: 0; border: 0; z-index: 1;' src="http://placekitten.com/g/200/100" />
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 200px; height: 80px; top: -5; left: -10; border: 0; z-index: 2;'>
<div>
<![endif]-->
<table width="200" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tr>
<td height="80" align="center" valign="top" style="color:#ffffff;font-size:20px;">
<span>Text</span>
</td>
</tr>
</table>
<!--[if gte mso 9]>
</div>
</v:shape>
<![endif]-->
</td>
</tr>
</table>
<table width="600" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
<tr>
<td style="width: 600px; height: 150px; background-image: url('http://placekitten.com/g/600/150');">
<!--[if gte mso 9]>
<v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 600px; height: 150px; top: 0; left: 0; border: 0; z-index: 1;' src="http://placekitten.com/g/600/150" />
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 600px; height: 150px; top: -5; left: -10; border: 0; z-index: 2;'>
<div>
<![endif]-->
<table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tr>
<td height="150" align="center" valign="top" style="color:#ffffff;font-size:20px;">
<span>Text</span>
</td>
</tr>
</table>
<!--[if gte mso 9]>
</div>
</v:shape>
<![endif]-->
</td>
</tr>
</table>