猿问

Outlook Windows 10 中 html 电子邮件中的备用间隙

他!

我对此很陌生,正在尝试编写我的第一个 html 电子邮件代码。我在 Outlook 和 Windows 10 中遇到 html 内联电子邮件代码的问题。它会在两个 td 之间产生不必要的间隙,从包含 img 的 td 开始一直到结束。https://codepen.io/kribits/pen/jOOYNmv。已经尝试了一些提示和技巧,例如更改为 display: block; 并用单独的标签分隔这两个 td,但这没有帮助。真的在寻找一些有用的答案。[巨大差距][2]

这是代码:

<html>

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <style color: #EC6700;></style>

    <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">

    <title>Mobilly signature</title>

    <style>

        u + #body a {

            color: inherit;

            text-decoration: none;

            font-size: inherit;

            font-family: inherit;

            font-weight: inherit;

            line-height: inherit;

        }

       a {

            color: #EC6700 !important;

        }

    </style>

<!--   <meta name="format-detection" content="telephone=no" /> -->

</head>

    <body id="body">

<table>

    <tbody height="100%" width="100%" cellpadding="0" cellspacing="0" border="0"

        style="box-sizing: border-box; border-collapse: collapse;">

        <tr style="box-sizing: border-box; border-collapse: collapse;">

            <td>

                <span

                    style="font-family: 'Open Sans', sans-serif !important; font-size:14px; line-height:20px; margin: 0;">Ar

                    cieņu,</span>

              <br>

                <p style="font-family: 'Open Sans', sans-serif !important; font-size:14px; line-height:20px;">

                    <b>Vārds Uzvārds</b><br>Zīmola vadītājs<br>SIA Company<br>Address<br>

                </p>

            </td>

        </tr>


杨__羊羊
浏览 115回答 1
1回答

LEATH

就这样吧。将您的两列部分包裹在另一个表格中并将它们左对齐。这确实解决了你的问题!https://codepen.io/ShuvojitDas/pen/wvayQdq<html><head>&nbsp; &nbsp;<meta charset="UTF-8">&nbsp; &nbsp;<meta name="viewport" content="width=device-width, initial-scale=1.0">&nbsp; &nbsp;<meta http-equiv="X-UA-Compatible" content="ie=edge">&nbsp; &nbsp;<style color: #EC6700;></style>&nbsp; &nbsp;<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">&nbsp; &nbsp;<title>Mobilly signature</title>&nbsp; &nbsp;<style>&nbsp; &nbsp;u+#body a {&nbsp; &nbsp; &nbsp; color: inherit;&nbsp; &nbsp; &nbsp; text-decoration: none;&nbsp; &nbsp; &nbsp; font-size: inherit;&nbsp; &nbsp; &nbsp; font-family: inherit;&nbsp; &nbsp; &nbsp; font-weight: inherit;&nbsp; &nbsp; &nbsp; line-height: inherit;&nbsp; &nbsp;}&nbsp; &nbsp;a {&nbsp; &nbsp; &nbsp; color: #EC6700 !important;&nbsp; &nbsp;}&nbsp; &nbsp;</style>&nbsp; &nbsp;&nbsp; &nbsp;<!--&nbsp; &nbsp;<meta name="format-detection" content="telephone=no" /> --></head><body id="body">&nbsp; &nbsp;<table style="border-spacing:0;text-align:left;">&nbsp; &nbsp; &nbsp; <tr style="border-collapse: collapse;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="font-family: 'Open Sans', sans-serif !important; font-size:14px; line-height:20px; margin: 0;">Ar&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cieņu,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <p style="font-family: 'Open Sans', sans-serif !important; font-size:14px; line-height:20px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<b>Vārds Uzvārds</b><br>Zīmola vadītājs<br>SIA Company<br>Address<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>&nbsp; &nbsp; &nbsp; </tr>&nbsp; &nbsp; &nbsp; <tr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <table>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<tr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td style="padding-right:24px; line-height:21px; font-family: 'Open Sans', sans-serif !important; font-size:14px; width:75px; height:75px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="https://mobilly.lv/wp-content/uploads/2020/03/Mobilly-Hor-161x161-1.jpg" width="75" height="75" alt="logo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td style="line-height:21px; font-family: 'Open Sans', sans-serif !important; font-size:14px; border-collapse: collapse; text-decoration: none !important;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<div style="color: #EC6700; "><span style="color: #EC6700; text-decoration:none !important;"> <a href="vards.uzvards@mobilly.lv" style="text-decoration:none;"> vards.uzvards&#64;mobilly.lv</a></span><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="https://mobilly.lv/" target="blank" style="color: #EC6700; text-decoration:none;"><span style="color: #EC6700; text-decoration:none;">www.mobilly.lv</span></a><br><span style="color: #EC6700; text-decoration:none !important;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="" style="color: #EC6700; text-decoration:none;">+371 66047706</a></span><br><a href="https://www.facebook.com/mobilly.lv/" target="blank" style="color: #EC6700; text-decoration:none;"><span style="color: #EC6700; text-decoration:none;">Facebook | </span></a><a href="https://www.instagram.com/mobilly.lv/?hl=en" target="blank" style="color: #EC6700; text-decoration:none;"><span style="color: #EC6700; text-decoration:none;">Instagram | </span></a><a href="https://twitter.com/mobilly?lang=en" target="blank" style="color: #EC6700; text-decoration:none;"><span style="color: #EC6700; text-decoration:none;">Twitter |</span></a><a href="https://www.linkedin.com/company/mobillysia" target="blank" style="color: #EC6700; text-decoration:none;"> <span style="color: #EC6700; text-decoration:none;">LinkedIn</span></a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </table>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>&nbsp; &nbsp; &nbsp; </tr>&nbsp; &nbsp; &nbsp; <tr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td style="padding-top: 20px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<p> Šis e-pasta sūtījums, kā arī visi tam pievienotie dokumenti ir konfidenciāli un paredzēti vienīgi uzrādītajam adresātam. Sūtījuma satura neakceptēta izpaušana, izplatīšana vai izmainīšana ir aizliegta un var būt prettiesiska. Ja Jūs neesat šī sūtījuma adresāts, lūdzu, informējiet par to nosūtītāju un izdzēsiet sūtījumu no sistēmas.</p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The information in this e-mail is confidential. It is intended solely for the addressee and access to the e-mail by anyone else is unauthorised. If you are not a named recipient, any disclosure, copying, reliance on it is prohibited and may be unlawful. If the notice is not intended for you, please notify the sender immediately and delete the e-mail.</p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>&nbsp; &nbsp; &nbsp; </tr>&nbsp; &nbsp;</table></body></html>
随时随地看视频慕课网APP

相关分类

Html5
我要回答