Hotmail的不显示HTML或CSS背景 [英] Hotmail not showing html or css background

查看:139
本文介绍了Hotmail的不显示HTML或CSS背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有背景的大多数电子邮件客户端,例如Gmail或Yahoo邮箱不显示的问题,但我发现<一个href=\"http://stackoverflow.com/questions/8015515/background-image-css-inside-an-html-email-gmail-does-not-support\">this线程,并通过更换(虽然我失去了像背景重复和位置的一些属性)&LT解决的问题;表格样式=背景:网址('bg.png');&GT; &LT;表格的背景=bg.png方式&gt;

I had problems with backgrounds not showing in most E-Mail clients such as GMail or Yahoo Mail but I found this thread and problem solved by replacing (although I lost some properties like background-repeat and position) <table style="background: url('bg.png');"> to <table background="bg.png">.

但现在我面临同样的问题在的Hotmail 和$上述形式C $ CS都不似乎工作。

But now I'm facing the same problem in Hotmail and none of the above form of codes seems to work.

本页面是答案在计算器最相似的问题参考,并说,展望.COM(新的Hotmail)不支持CSS背景和我应该使用背景属性,而不是,但我没有工作。

This page is the reference of answers to most similar questions in stackoverflow, and it says that Outlook.com (new hotmail) does not support css background and I should use background attribute instead, but mine is not working.

我在做什么错?!

推荐答案

Outlook只支持body标签的背景。

Outlook only supports background in the body tag.

两种方式去电子邮件背景:

Two ways to go for email backgrounds:

通过VML: emailbg.net

或这里是看中了较少的方式:

or here is the less fancy way:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body style="margin: 0px; padding: 0px; background-image: url('http://lorempixel.com/100/100/food/'); background-color: #252525; background-repeat: repeat-y no-repeat; background-position: top left;" bgcolor="#252525">
<!-- BODY FAKE PANEL -->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" background="http://lorempixel.com/100/100/food/">
  <tr>
    <td valign="top">
<!-- CENTER FLOAT -->
      <table width="600" height="800" border="0" valign="top" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
          <td align="center">
Center panel
          </td>
        </tr>
      </table>
<!-- /CENTER FLOAT -->
    </td>
  </tr>
</table>
<!-- /BODY FAKE PANEL -->
</body>
</html> 

这篇关于Hotmail的不显示HTML或CSS背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆