我想在甲骨文的桌子上添加一个背景图片。这是我的密码。当电子邮件被发送时,图像不会显示在表格的背景中。这是存储在一个过程中。
<table width="100%" style="background:url(http://linktomyimage.png); background-repeat:no-repeat;">
<tr>
for i in (select doc, source, title from table)
loop
msg_html := msg_html ||'<td>'||'i.doc||'</td><td>'||'i.source||'</td><td>'||'i.title||'</td>
end loop;
msg_html := msg_html ||'</tr></table>';
发布于 2016-01-19 16:45:16
我知道有一些验证问题,但我认为问题是,背景图像不一致地支持整个电子邮件客户端。http://www.campaignmoniter.com/css
现在,有一个方法可以得到它,所以大多数电子邮件客户端将接受这一点,但它需要相当多的代码,并可能变得复杂。
背景必须在HTML属性("background=")和CSS(背景图像:url(htp://))中声明。它还需要在Outlook的VBA中完成。
从这些开始的好地方是:https://backgrounds.cm/
他们为你做了大部分的基本工作,设置背景图像和后背颜色等。
示例:
<td background="https://i.imgur.com/YJOX1PC.png" bgcolor="#7bceeb" width="120" height="92" valign="top" style="background-image: url(https://i.imgur.com/YJOX1PC.png); background-color:#7bceeb;" >
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:120px;height:92px;">
<v:fill type="tile" src="https://i.imgur.com/YJOX1PC.png" color="#7bceeb" />
<v:textbox inset="0,0,0,0">
<![endif]-->
<div>
INSERT CONTENT HERE
</div>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>
根据您提供的代码:
<td background="https://i.imgur.com/YJOX1PC.png" bgcolor="#7bceeb" width="120" height="92" valign="top" style="background-image: url(https://i.imgur.com/YJOX1PC.png); background-color:#7bceeb;" >
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:120px;height:92px;">
<v:fill type="tile" src="https://i.imgur.com/YJOX1PC.png" color="#7bceeb" />
<v:textbox inset="0,0,0,0">
<![endif]-->
<div>
msg_html := msg_html || '<table width="100%">
<tr>
<td nowrap style="font-weight: bold;">Document</td>
<th nowrap style="font-weight: bold; text-align:left;">Collections</td>
<th nowrap style="font-weight: bold; text-align:left;">Title</td>
</tr>
<tr style="background-color: #ffffff;">';
for i in (select DOCNO, SOURCE, TITLE, GUIDE from tablename)
loop
msg_html := msg_html || '<td nowrap class="leftAlignment"><a href="http://mywebsite.com?guideURL='''||i.guide||'''&docnum='''||i.docno||'''">DocNum</a></td>
<td nowrap class="leftAlignment">'||i.source|| '</td>
<td nowrap class="leftAlignment">'||i.title|| '</td>
<td nowrap class="leftAlignment">'||i.source||'</td>
<td class="leftAlignment"></td></tr><tr class="read">';
end loop;
msg_html :=msg_html ||'<td class="leftAlignment"></td></tr>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</div>
</table>
</td>
看起来,问题是您忘记关闭脚本中的表标记和保存脚本的div标记。如果你把这些关了,我相信它会有用的。
https://stackoverflow.com/questions/34879959
复制相似问题