繁体   English   中英

Outlook.com和gmail.com的HTML电子邮件问题

[英]Html email issue for outlook.com and gmail.com

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
    <table cellpadding="0" cellspacing="0" border="0" align="center" width="600" height="931">
        <tr>
            <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_01.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_02.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_03.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_04.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_05.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_06.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_07.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_08.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_09.png" alt="" style="display:block;" width="600" height="100" border="0" />
            </a>
        </td>
    </tr>
    <tr>
        <td>
            <a href="http://www.google.com" target="_blank">
                <img src="images/img_10.png" alt="" style="display:block;" width="600" height="31" border="0" />
            </a>
        </td>
    </tr>
</table>
</body>
</html>

我正在发送html电子邮件(类似于上面的代码),但gmail.com和Outlook.com中的邮件发送器不正确。 他们都在a标签周围添加p标签,然后在img标签周围插入span标签;

<td>
  <p class="some class name"
    <a href="http://www.google.com" target="_blank">
      <span class="some class name">
        <img src="images/img_10.png" alt="" style="display:block;" width="600" height="31" border="0" />
      </span> 
    </a>
  </p>
</td>

因此看起来tr标签之间的差距。 我该如何解决?

请使用style="margin: 0; border: 0; padding: 0; display: block;" 对于所有图像。

另外,将table td {border-collapse: collapse;}到标题样式标签中可能对Outlook有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM