开发者

HTML e-mails don't download background images

I am creating and sending HTML e-mails.

I'm using markup like

<table style="background: url('http://example.com/App_Sprites/image.gif');>

However, the images do not appear when I download messages containing this sort of markup from an e-mail client. When I do things like

<img 开发者_StackOverflowsrc="http://example.com/App_Sprites/image.gif" />

the images download fine.

I need the image to be a background because I need to show some text over it. Can I use the image tag and position the text over it somehow? Or should using the background image actually be working, and something else may be wrong?


Html emails usally don't download background images.But there is a trick you can do.

<div style="z-index:10;position:relative">your text here</div>
<img src="http://example.com/App_Sprites/image.gif" style="margin-top:-20px" />

play with margin-top number


The background property works on some email clients use this as a reference. This is very useful.

I would avoid using background images and stick to solid colors, the reason why is because not all email clients are going to have this feature and capability to see the background image.


or use base64 directly =) hm divs are even better than tables

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜