Background Images in HTML E-mails
Is it possible to have image backgrounds inside开发者_JAVA百科 HTML e-mails that are displayed across webmail as well as locally installed mail clients?
Thank you.
The short answer is no. If you are wanting to use CSS to set a background-image
then you will find that this will not work in a number of web and desktop clients (especially Outlook), and it is considered best practice to avoid using them.
The preferred solution is to create a design which can be built using <img />
tags instead. This will have much more consistant results across all web and desktop clients.
Many clients strip out image backgrounds in HTML e-mails for security reasons. So there is to my knowledge no way to make absolutely certain that the image is displayed.
For example, this way does not work for people viewing the mail in Outlook.
精彩评论