Outlook 2016 在 table 行之间添加了 space。 HTML 给开发者发邮件,找不到有效的修复

Outlook 2016 adds space between table rows. HTML email dev, can't find a fix that works

Outlook 2016 正在 HTML 电子邮件的 table 行之间添加 space。我找不到有效的修复方法。 Blue section on top should be one bar, not have the white gaps. Gray section on bottom should also be one footer section, not have the two white gaps in it.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"> <!-- utf-8 works for most cases -->
    <meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
    <meta name="x-apple-disable-message-reformatting">  <!-- Disable auto-scale in iOS 10 Mail entirely -->
    <title>Learn how to improve employee retention by over 40%!</title> <!-- The title tag shows in email notifications, like Android 4.4. -->

    <!-- Web Font / @font-face : BEGIN -->

    <!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->
    <!--[if mso]>
        <style>
            * {
                font-family: sans-serif !important;
            }
        </style>
    <![endif]-->

    <!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. More on that here: http://stylecampaign.com/blog/2015/02/webfont-support-in-email/ -->
    <!--[if !mso]><!-->
        <link href='<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css' />
    <!--<![endif]-->

    <!-- Web Font / @font-face : END -->

    <!-- CSS Reset -->
    <style>

        /* What it does: Remove spaces around the email design added by some email clients. */
        /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */
        html,
        body {
            margin: 0 auto !important;
            padding: 0 !important;
            height: 100% !important;
            width: 100% !important;
        }

        /* What it does: Stops email clients resizing small text. */
        * {
            -ms-text-size-adjust: 100%;
            -webkit-text-size-adjust: 100%;
        }

        /* What is does: Centers email on Android 4.4 */
        div[style*="margin: 16px 0"] {
            margin:0 !important;
        }

        /* What it does: Stops Outlook from adding extra spacing to tables. */
        table,
        td {
            mso-table-lspace: 0pt !important;
            mso-table-rspace: 0pt !important;
        }

        /* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */
        table {
            border-spacing: 0 !important;
            border-collapse: collapse !important;
            table-layout: fixed !important;
            margin: 0 auto !important;
        }
        table table table {
            table-layout: auto;
        }

        /* What it does: Uses a better rendering method when resizing images in IE. */
        img {
            -ms-interpolation-mode:bicubic;
        }

        /* What it does: A work-around for iOS meddling in triggered links. */
        *[x-apple-data-detectors] {
            color: inherit !important;
            text-decoration: none !important;
        }

        /* What it does: A work-around for Gmail meddling in triggered links. */
        .x-gmail-data-detectors,
        .x-gmail-data-detectors *,
        .aBn {
            border-bottom: 0 !important;
            cursor: default !important;
        }

        /* What it does: Prevents Gmail from displaying an download button on large, non-linked images. */
        .a6S {
            display: none !important;
            opacity: 0.01 !important;
        }
        /* If the above doesn't work, add a .g-img class to any image in question. */
        img.g-img + div {
            display:none !important;
        }

        /* What it does: Prevents underlining the button text in Windows 10 */
        .button-link {
            text-decoration: none !important;
        }

        h1 {
            overflow: hidden;
            text-align: center;
        }

        h2:before,
        h2:after {
            background-color: #777777;
            content: "";
            display: inline-block;
            height: 1px;
            position: relative;
            vertical-align: middle;
            width: 50%;
        }

        h2:before {
            right: 0.8em;
            margin-left: -50%;
        }

        h2:after {
            left: 0.8em;
            margin-right: -50%;
        }

        /* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89  */
        /* Create one of these media queries for each additional viewport size you'd like to fix */
        /* Thanks to Eric Lepetit @ericlepetitsf) for help troubleshooting */
        @media only screen and (min-device-width: 375px) and (max-device-width: 413px) { /* iPhone 6 and 6+ */
            .email-container {
                min-width: 375px !important;
            }

        }

         @media only screen and (max-width: 600px){
        .hero-img {
            height:auto !important;
            max-width:600px !important;
            width: 100% !important;
        }
    }

    </style>

    <!-- Progressive Enhancements -->
    <style>

        /* What it does: Hover styles for buttons */
        .button-td,
        .button-a {
            transition: all 100ms ease-in;
        }
        .button-td:hover,
        .button-a:hover {
            background: #ffd541 !important;
            border-color: #ffd541 !important;
        }

    </style>

</head>
<body padding="0" width="100%" bgcolor="#ffffff" style="padding: 0; margin: 0; mso-line-height-rule: exactly;">
<center style="width: 100%; background: #ffffff; text-align: center; display: inline-block;"><!-- Visually Hidden Preheader Text : BEGIN -->
<div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;">Hidden text</div>
<!-- Visually Hidden Preheader Text : END --><!--
            Set the email width. Defined in two places:
            1. max-width for all clients except Desktop Windows Outlook, allowing the email to squish on narrow but never go wider than 600px.
            2. MSO tags for Desktop Windows Outlook enforce a 600px width.
        -->
<div class="email-container" style="max-width: 600px; margin: auto;"><!--[if mso]>
            <table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" width="600" align="center">
            <tr>
            <td>
            <![endif]--><!-- Email Header : BEGIN -->
<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width: 600px;" width="100%"><tr><td height="33" bgcolor="#0072bc" style="font-size: 0; line-height: 0;" class="">&nbsp;</td> </tr><tr><td bgcolor="#0072bc" align="center" class=""><a href="http://companynameweb.com/"><img alt="companyname logo" src="http://www2.companynameweb.com/l/50342/2017-04-10/8frt4b/50342/155397/companyname_logo_lockup_white.png" aria-hidden="true" border="0" height="54" style="border-spacing: 0; min-height: 54px;"></a></td></tr><tr><td height="33" bgcolor="#0072bc" style="font-size: 0; line-height: 0;" class="">&nbsp;</td></tr></table>
<!-- Email Header : END --><!-- Email Body : BEGIN -->
<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width: 600px;" width="100%">
        <tr>
            <td align="left" height="5" style="font-family: sans-serif; font-size:1px; mso-line-height-rule: exactly; line-height:100%;" valign="top">&nbsp;</td>
        </tr>
        <!-- Hero Image, Flush : BEGIN -->
        <tr>
            <td style="background: #ffffff" class=""><img alt="" aria-hidden="true" border="0" class="hero-img" src="http://www2.companynameweb.com/l/50342/2017-04-10/8frt4d/50342/155399/replaced_informed_employees.jpg" style="height: auto; background: #ffffff; border-width: 0px; width: 600px; line-height: 0px; color: #ffffff; max-width: 600px;" width="600"></td>
        </tr>
        <!-- Hero Image, Flush : END --><!-- 1 Column Text + Button : BEGIN -->
        <tr>
            <td height="53" style="font-size: 0; line-height: 0; min-height: 53px;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td class="stack-column-center" style="font-family: 'Lato', sans-serif; line-height: 1.4em; color: #777777; text-align: center; padding: 0px 30px 0px 30px;" width="100%"><span style="color:#0072bc; font-size:18px;"><strong>It’s simple:</strong></span> lorem ipsum.<br>
            <br>
            lorem ipsum<em>replaceds</em>.</td>
        </tr>
        <tr>
            <td height="40" style="font-size: 0; line-height: 0; min-height: 40px;" class="">&nbsp;</td>
        </tr>
</table>
<!-- Button : Begin -->

<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="margin: auto;">
        <tr>
            <td class="button-td" pardot-data="link-underline:none !important;" style="border-radius: 12px; background: #FFC220; text-align: center; text-decoration: none !important;"><a class="button-a" href="http://www.companynameweb.com/" style="background: rgb(255, 194, 32); border: 15px solid rgb(255, 194, 32); font-family: sans-serif; font-size: 16px; letter-spacing: 1.5px; line-height: 1.1; text-align: center; display: block; border-radius: 4px; font-weight: bold; text-decoration: none !important;"><span class="button-link" style="color:#0072BC; text-transform: uppercase; text-decoration: none !important;">&nbsp;&nbsp;&nbsp;&nbsp;SEE HOW IT WORKS&nbsp;&nbsp;&nbsp;&nbsp;</span></a></td>
        </tr>
</table>
<!-- Button : END --><!-- Social : Begin -->

<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" width="90%">
        <tr>
            <td height="50" style="font-size: 0; line-height: 0; min-height: 50px;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td align="center" class="stack-column-center" style="font-family: sans-serif; line-height: 20px; color: #777777; padding: 0px 20px 0px 20px; overflow: hidden;">
            <h2 style="font-size: 13px; text-transform: uppercase; text-align: center;">Follow us</h2>
            </td>
        </tr>
        <tr>
            <td height="40" style="font-size: 0; line-height: 0; min-height: 40px;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td align="center" class=""><!--[if (gte mso 9)|(IE)]>
            <table align="center" border="0" cellspacing="0" cellpadding="0" width="600">
            <tr>
            <td align="center" valign="top" width="600">
            <![endif]--></td>
        </tr>
</table>

<table align="center" border="0" cellpadding="0" cellspacing="0" style="max-width:600px;" width="100%">
        <tr>
            <td align="center">
            <table align="center" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="27" class="">&nbsp;</td>
                        <td align="center" class=""><a href="https://www.linkedin.com/company-beta/522708/" style="display: block; line-height: 29px; color: #777777; min-height: 29px;"><img alt="LinkedIn social icon" aria-hidden="true" height="29" src=".png" style="min-height: 29px; background: #ffffff; padding: 0 11px;" width="29"></a></td>
                        <td width="27" class="">&nbsp;</td>
                        <td align="center" class=""><a href="https://www.youtube.com/user/companynamemarketing" style="display: block; line-height: 29px; color: #777777; min-height: 29px;"><img alt="YouTube social icon" aria-hidden="true" height="29" src=".png" style="min-height: 29px; background: #ffffff; padding: 0 11px;" width="29"></a></td>
                        <td width="27" class="">&nbsp;</td>
                        <td align="center" class=""><a href="https://www.facebook.com/companynamemarketing/" style="display: block; line-height: 29px; color: #777777; min-height: 29px;"><img alt="Facebook social icon" aria-hidden="true" height="29" src="png" style="min-height: 29px; background: #ffffff; padding: 0 11px;" width="29"></a></td>
                        <td width="27" class="">&nbsp;</td>
                        <td align="center" class=""><a href="https://twitter.com/companynameEverydayWell" style="display: block; line-height: 29px; color: #777777; min-height: 29px;"><img alt="Twitter social icon" aria-hidden="true" height="29" src=".png" style="min-height: 29px; background: #ffffff; padding: 0 11px;" width="29"></a></td>
                        <td width="27" class="">&nbsp;</td>
                    </tr>
            </table>
            </td>
        </tr>
        <tr>
            <td height="40" style="font-size: 0; line-height: 0; min-height: 40px;" class="">&nbsp;</td>
        </tr>
</table>
<!-- Social : END -->

<!-- Email Footer : Begin -->
<table align="center" bgolor="#e1e1e1" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#e1e1e1; border-spacing: 0; max-width: 600px;" width="100%">
        <tr>
            <td height="39" style="border-spacing: 0; line-height: 0; max-height: 39px; min-height: 39px;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td class="x-gmail-data-detectors" style="padding: 0px 10px 0px 10px; width: 100%; font-size: 8px; font-family: sans-serif; line-height: 11px; text-align: center; color: #2e2e2e;"><webversion style="color:#2e2e2e; text-decoration:underline; font-weight: bold;">View as a Web Page</webversion><br><br>
            © Copyright 2017 <span style="font-weight: bolder;">companyname</span><br>
            <a href="mailto:companynamepublications@companynameweb.com">@companynameweb.com</a> | <a href="tel:1-800-364-4748">phone</a><br>
            <span style="font-weight: bolder;">companyname</span> Headquarters | address<br><br>
            <a href="%%unsubscribe%%" style="display: block; color:#2e2e2e; text-decoration:underline; text-transform: uppercase;">Click here to unsubscribe</a></td>
        </tr>
        <tr>
            <td height="39" style="border-spacing: 0; line-height: 0; max-height: 39px; min-height: 39px;" class="">&nbsp;</td>
        </tr>
</table>
<!-- Email Footer : END --><!--[if mso]>
            </td>
            </tr>
            </table>
            <![endif]--></div>
</center>
</body>
</html>

我想通了。

font-size: 0; line-height: 0;

需要以像素为单位定义,我添加了

valign="middle"

每个 table 行的数据。

我替换了:

<!-- Email Header : BEGIN -->
<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width: 600px;" width="100%">
    <tbody>
        <tr>
            <td height="33" bgcolor="#0072bc" style="font-size: 0; line-height: 0;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td bgcolor="#0072bc" align="center" class=""><a href="http://companynameweb.com/"><img alt="companyname logo" src="http://www2.companynameweb.com/l/50342/2017-04-10/8frt4b/50342/155397/companyname_logo_lockup_white.png" aria-hidden="true" border="0" height="54" style="border-spacing: 0; min-height: 54px;"></a></td>
        </tr>
        <tr>
            <td height="33" bgcolor="#0072bc" style="font-size: 0; line-height: 0;" class="">&nbsp;</td>
        </tr>
    </tbody>
</table>
<!-- Email Header : END -->

与:

<!-- Email Header : BEGIN -->
<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width: 600px;" width="100%">
    <tbody>
        <tr>
            <td bgcolor="#0072bc" height="33" style="display: block; font-size: 0px; line-height: 0px;" valign="middle" class="">&nbsp;</td>
        </tr>
        <tr>
            <td align="center" bgcolor="#0072bc" class=""><a href="http://companynameweb.com/"><img alt="companyname logo" aria-hidden="true" border="0" height="54" src="http://www2.companynameweb.com/l/50342/2017-04-10/8frt4b/50342/155397/companyname_logo_lockup_white.png" style="vertical-align: middle; border-spacing: 0; min-height: 54px;" valign="middle"></a></td>
        </tr>
        <tr>
            <td bgcolor="#0072bc" height="33" style="font-size: 0px; line-height: 0px;" valign="middle" class="">&nbsp;</td>
        </tr>
    </tbody>
</table>
<!-- Email Header : END -->

它现在适用于所有客户端。与页脚相同。我替换了:

<!-- Email Footer : Begin -->
<table align="center" bgolor="#e1e1e1" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#e1e1e1; border-spacing: 0; max-width: 600px;" width="100%">
        <tr>
            <td height="39" style="border-spacing: 0; line-height: 0; max-height: 39px; min-height: 39px;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td class="x-gmail-data-detectors" style="padding: 0px 10px 0px 10px; width: 100%; font-size: 8px; font-family: sans-serif; line-height: 11px; text-align: center; color: #2e2e2e;"><webversion style="color:#2e2e2e; text-decoration:underline; font-weight: bold;">View as a Web Page</webversion><br><br>
            © Copyright 2017 <span style="font-weight: bolder;">companyname</span><br>
            <a href="mailto:@companynameweb.com">@companynameweb.com</a> | <a href="tel:1-111-111-1111">1-111-111-1111</a><br>
            <span style="font-weight: bolder;">companyname</span> Headquarters | address<br><br>
            <a href="%%unsubscribe%%" style="display: block; color:#2e2e2e; text-decoration:underline; text-transform: uppercase;">Click here to unsubscribe</a></td>
        </tr>
        <tr>
            <td height="39" style="border-spacing: 0; line-height: 0; max-height: 39px; min-height: 39px;" class="">&nbsp;</td>
        </tr>
</table>
<!-- Email Footer : END -->

与:

<!-- Email Footer : Begin -->
<table align="center" aria-hidden="true" cellpadding="0" cellspacing="0" role="presentation" style="max-width: 600px;" width="100%">
    <tbody>
        <tr>
            <td bgcolor="#e1e1e1" height="39" style="display: block; font-size: 0px; line-height: 0px;" valign="middle" class="">&nbsp;</td>
        </tr>
        <tr>
            <td bgcolor="#e1e1e1" border="0" class="x-gmail-data-detectors" style="vertical-align: middle; border-spacing: 0; font-size: 8px; font-family: sans-serif; line-height: 11px; text-align: center; color: #2e2e2e;" valign="middle"><webversion style="color:#2e2e2e; text-decoration:underline; font-weight: bold;">View as a Web Page</webversion><br>
            <br>
            © Copyright 2017 <span style="font-weight: bolder;">eni</span><br>
            <a href="mailto:@companynameweb.com">@companynameweb.com</a> <a href="tel:1-111-111-1111">1-111-111-1111</a><br>
            <span style="font-weight: bolder;">companyname</span> Headquarters | address<br>
            <br>
            <a href="%%unsubscribe%%" style="display: block; color:#2e2e2e; text-decoration:underline; text-transform: uppercase;">Click here to unsubscribe</a></td>
        </tr>
        <tr>
            <td bgcolor="#e1e1e1" height="39" style="display: block; font-size: 0px; line-height: 0px;" valign="middle" class="">&nbsp;</td>
        </tr>
    </tbody>
</table>
<!-- Email Footer : END -->

现在它不再坏了。 td 还需要 bgcolor。

我修复了@flexlearn 提出的问题,并为不同的支持客户端添加了更多代码。

基本上这些是我所做的更改:

  • 添加了显示块
  • 删除了 table td
  • 上的最大和最小高度
  • 将字体大小和行高固定为 0px
  • 您还有两个 google 字体的 href(现在代码在 Dreamweaver 中看起来更好)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"> <!-- utf-8 works for most cases -->
    <meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
    <meta name="x-apple-disable-message-reformatting">  <!-- Disable auto-scale in iOS 10 Mail entirely -->
    <title>Learn how to improve employee retention by over 40%!</title> <!-- The title tag shows in email notifications, like Android 4.4. -->

    <!-- Web Font / @font-face : BEGIN -->

    <!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->
    <!--[if mso]>
        <style>
            * {
                font-family: sans-serif !important;
            }
        </style>
    <![endif]-->

    <!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. More on that here: http://stylecampaign.com/blog/2015/02/webfont-support-in-email/ -->
    <!--[if !mso]><!-->
        <link href="https://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet" type="text/css" />
    <!--<![endif]-->

    <!-- Web Font / @font-face : END -->

    <!-- CSS Reset -->
    <style>

        /* What it does: Remove spaces around the email design added by some email clients. */
        /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */
        html,
        body {
            margin: 0 auto !important;
            padding: 0 !important;
            height: 100% !important;
            width: 100% !important;
        }

        /* What it does: Stops email clients resizing small text. */
        * {
            -ms-text-size-adjust: 100%;
            -webkit-text-size-adjust: 100%;
        }

        /* What is does: Centers email on Android 4.4 */
        div[style*="margin: 16px 0"] {
            margin:0 !important;
        }

        /* What it does: Stops Outlook from adding extra spacing to tables. */
        table,
        td {
            mso-table-lspace: 0pt !important;
            mso-table-rspace: 0pt !important;
        }

        /* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */
        table {
            border-spacing: 0 !important;
            border-collapse: collapse !important;
            table-layout: fixed !important;
            margin: 0 auto !important;
        }
        table table table {
            table-layout: auto;
        }

        /* What it does: Uses a better rendering method when resizing images in IE. */
        img {
            -ms-interpolation-mode:bicubic;
        }

        /* What it does: A work-around for iOS meddling in triggered links. */
        *[x-apple-data-detectors] {
            color: inherit !important;
            text-decoration: none !important;
        }

        /* What it does: A work-around for Gmail meddling in triggered links. */
        .x-gmail-data-detectors,
        .x-gmail-data-detectors *,
        .aBn {
            border-bottom: 0 !important;
            cursor: default !important;
        }

        /* What it does: Prevents Gmail from displaying an download button on large, non-linked images. */
        .a6S {
            display: none !important;
            opacity: 0.01 !important;
        }
        /* If the above doesn't work, add a .g-img class to any image in question. */
        img.g-img + div {
            display:none !important;
        }

        /* What it does: Prevents underlining the button text in Windows 10 */
        .button-link {
            text-decoration: none !important;
        }

        h1 {
            overflow: hidden;
            text-align: center;
        }

        h2:before,
        h2:after {
            background-color: #777777;
            content: "";
            display: inline-block;
            height: 1px;
            position: relative;
            vertical-align: middle;
            width: 50%;
        }

        h2:before {
            right: 0.8em;
            margin-left: -50%;
        }

        h2:after {
            left: 0.8em;
            margin-right: -50%;
        }

        /* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89  */
        /* Create one of these media queries for each additional viewport size you'd like to fix */
        /* Thanks to Eric Lepetit @ericlepetitsf) for help troubleshooting */
        @media only screen and (min-device-width: 375px) and (max-device-width: 413px) { /* iPhone 6 and 6+ */
            .email-container {
                min-width: 375px !important;
            }

        }

         @media only screen and (max-width: 600px){
        .hero-img {
            height:auto !important;
            max-width:600px !important;
            width: 100% !important;
        }
    }

    </style>

    <!-- Progressive Enhancements -->
    <style>

        /* What it does: Hover styles for buttons */
        .button-td,
        .button-a {
            transition: all 100ms ease-in;
        }
        .button-td:hover,
        .button-a:hover {
            background: #ffd541 !important;
            border-color: #ffd541 !important;
        }

    </style>

</head>
<body padding="0" width="100%" bgcolor="#ffffff" style="padding: 0; margin: 0; mso-line-height-rule: exactly;">
<center style="width: 100%; background: #ffffff; text-align: center; display: inline-block;"><!-- Visually Hidden Preheader Text : BEGIN -->
<div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;">Hidden text</div>
<!-- Visually Hidden Preheader Text : END --><!--
            Set the email width. Defined in two places:
            1. max-width for all clients except Desktop Windows Outlook, allowing the email to squish on narrow but never go wider than 600px.
            2. MSO tags for Desktop Windows Outlook enforce a 600px width.
        -->
<div class="email-container" style="max-width: 600px; margin: auto;"><!--[if mso]>
            <table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" width="600" align="center">
            <tr>
            <td>
            <![endif]--><!-- Email Header : BEGIN -->
<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width: 600px;" width="100%"><tr><td height="33" bgcolor="#0072bc" style="font-size: 0px; line-height: 0px;height:33px;" class="">&nbsp;</td> </tr><tr><td bgcolor="#0072bc" align="center" class=""><a href="http://companynameweb.com/"><img alt="companyname logo" src="http://www2.companynameweb.com/l/50342/2017-04-10/8frt4b/50342/155397/companyname_logo_lockup_white.png" aria-hidden="true" border="0" height="54" style="border-spacing: 0; min-height: 54px;display:block;"></a></td></tr><tr><td height="33" bgcolor="#0072bc" style="font-size: 0px; line-height: 0px;" class="">&nbsp;</td></tr></table>
<!-- Email Header : END --><!-- Email Body : BEGIN -->
<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width: 600px;" width="100%">
        <tr>
            <td align="left" height="5" style="font-family: sans-serif; font-size:1px; mso-line-height-rule: exactly; line-height:100%;" valign="top">&nbsp;</td>
        </tr>
        <!-- Hero Image, Flush : BEGIN -->
        <tr>
            <td style="background: #ffffff" class=""><img alt="" aria-hidden="true" border="0" class="hero-img" src="http://www2.companynameweb.com/l/50342/2017-04-10/8frt4d/50342/155399/replaced_informed_employees.jpg" style="height: auto; background: #ffffff; border-width: 0px; width: 600px; line-height: 0px; color: #ffffff; max-width: 600px;display:block;" width="600"></td>
        </tr>
        <!-- Hero Image, Flush : END --><!-- 1 Column Text + Button : BEGIN -->
        <tr>
          <td height="53" style="font-size: 0px; line-height: 0px; min-height: 53px;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td class="stack-column-center" style="font-family: 'Lato', sans-serif; line-height: 1.4em; color: #777777; text-align: center; padding: 0px 30px 0px 30px;" width="100%"><span style="color:#0072bc; font-size:18px;"><strong>It’s simple:</strong></span> lorem ipsum.<br>
            <br>
            lorem ipsum<em>replaceds</em>.</td>
        </tr>
        <tr>
          <td height="40" style="font-size: 0px; line-height: 0px; min-height: 40px;" class="">&nbsp;</td>
        </tr>
</table>
<!-- Button : Begin -->

<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="margin: auto;">
        <tr>
            <td class="button-td" pardot-data="link-underline:none !important;" style="border-radius: 12px; background: #FFC220; text-align: center; text-decoration: none !important;"><a class="button-a" href="http://www.companynameweb.com/" style="background: rgb(255, 194, 32); border: 15px solid rgb(255, 194, 32); font-family: sans-serif; font-size: 16px; letter-spacing: 1.5px; line-height: 1.1; text-align: center; display: block; border-radius: 4px; font-weight: bold; text-decoration: none !important;"><span class="button-link" style="color:#0072BC; text-transform: uppercase; text-decoration: none !important;">&nbsp;&nbsp;&nbsp;&nbsp;SEE HOW IT WORKS&nbsp;&nbsp;&nbsp;&nbsp;</span></a></td>
        </tr>
</table>
<!-- Button : END --><!-- Social : Begin -->

<table align="center" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" width="90%">
        <tr>
          <td height="50" style="font-size: 0px; line-height: 0px; min-height: 50px;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td align="center" class="stack-column-center" style="font-family: sans-serif; line-height: 20px; color: #777777; padding: 0px 20px 0px 20px; overflow: hidden;">
            <h2 style="font-size: 13px; text-transform: uppercase; text-align: center;">Follow us</h2>
            </td>
        </tr>
        <tr>
          <td height="40" style="font-size: 0px; line-height: 0px; min-height: 40px;" class="">&nbsp;</td>
        </tr>
        <tr>
            <td align="center" class=""><!--[if (gte mso 9)|(IE)]>
            <table align="center" border="0" cellspacing="0" cellpadding="0" width="600">
            <tr>
            <td align="center" valign="top" width="600">
            <![endif]--></td>
        </tr>
</table>

<table align="center" border="0" cellpadding="0" cellspacing="0" style="max-width:600px;" width="100%">
        <tr>
            <td align="center">
            <table align="center" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="27" class="">&nbsp;</td>
                        <td align="center" class=""><a href="https://www.linkedin.com/company-beta/522708/" style="display: block; line-height: 29px; color: #777777; min-height: 29px;"><img alt="LinkedIn social icon" aria-hidden="true" height="29" src=".png" style="min-height: 29px; background: #ffffff; padding: 0 11px;" width="29"></a></td>
                        <td width="27" class="">&nbsp;</td>
                        <td align="center" class=""><a href="https://www.youtube.com/user/companynamemarketing" style="display: block; line-height: 29px; color: #777777; min-height: 29px;"><img alt="YouTube social icon" aria-hidden="true" height="29" src=".png" style="min-height: 29px; background: #ffffff; padding: 0 11px;" width="29"></a></td>
                        <td width="27" class="">&nbsp;</td>
                        <td align="center" class=""><a href="https://www.facebook.com/companynamemarketing/" style="display: block; line-height: 29px; color: #777777; min-height: 29px;"><img alt="Facebook social icon" aria-hidden="true" height="29" src="png" style="min-height: 29px; background: #ffffff; padding: 0 11px;" width="29"></a></td>
                        <td width="27" class="">&nbsp;</td>
                        <td align="center" class=""><a href="https://twitter.com/companynameEverydayWell" style="display: block; line-height: 29px; color: #777777; min-height: 29px;"><img alt="Twitter social icon" aria-hidden="true" height="29" src=".png" style="min-height: 29px; background: #ffffff; padding: 0 11px;" width="29"></a></td>
                        <td width="27" class="">&nbsp;</td>
                    </tr>
            </table>
            </td>
        </tr>
        <tr>
          <td height="40" style="font-size: 0px; line-height: 0px; min-height: 40px;" class="">&nbsp;</td>
        </tr>
</table>
<!-- Social : END -->

<!-- Email Footer : Begin -->
<table align="center" bgolor="#e1e1e1" aria-hidden="true" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#e1e1e1; border-spacing: 0; max-width: 600px;" width="100%">
        <tr>
            <td height="39" style="border-spacing: 0; line-height: 0px;height: 39px;" class=""></td>
        </tr>
        <tr>
            <td class="x-gmail-data-detectors" style="padding: 0px 10px 0px 10px; width: 100%; font-size: 8px; font-family: sans-serif; line-height: 11px; text-align: center; color: #2e2e2e;"><webversion style="color:#2e2e2e; text-decoration:underline; font-weight: bold;">View as a Web Page</webversion><br><br>
            © Copyright 2017 <span style="font-weight: bolder;">companyname</span><br>
            <a href="mailto:companynamepublications@companynameweb.com">@companynameweb.com</a> | <a href="tel:1-800-364-4748">phone</a><br>
            <span style="font-weight: bolder;">companyname</span> Headquarters | address<br><br>
            <a href="%%unsubscribe%%" style="display: block; color:#2e2e2e; text-decoration:underline; text-transform: uppercase;">Click here to unsubscribe</a></td>
        </tr>
        <tr>
          <td height="39" style="border-spacing: 0; line-height: 0px;height: 39px;" class=""></td>
        </tr>
</table>
<!-- Email Footer : END --><!--[if mso]>
            </td>
            </tr>
            </table>
            <![endif]--></div>
</center>
</body>
</html>

让我知道这是否适合你。

构建间隔行时,字体大小和行高必须声明为 0px(不是 0)。

<tr>
  <td height="13" align="center" valign="middle" style="margin: 0; font-size: 0px; line-height: 0px;">&nbsp;</td>
</tr>

添加这个简单的 css 样式对我有用:

<table style="border-spacing: 0 !important; border-collapse: collapse !important;"> </table>