0

我正在尝试为电子邮件创建一个界面。我想导入一张图片,但没有 cid 就无法做到。例如:

这工作得很好。但我似乎无法将文字放在图片的左侧。请看下面的代码以获得更好的理解!

<div style="background-color:black;">
<body style="font-color:white;">
    <h1><i>Airline Credits</i></h1>
    </br>
    </ul>
    Dear [FullName],<br/>
    Thank you for your <i>Airline Credits</i> redemption. Below is a summary of your order:

    <b>Order Date:</b>[OrderDate]<br/>
    <b>Description:</b>[ItemName]
    <br/><b>Redemption Amount:</b>[CostInPoints]
    <br/><b>Order Tracking Number:</b>[OrderNumber]

    <br/><br/>
    <b>Please note:</b>
    If you did not make this request, please contact us immediately at [AirlinePhoneNumber]. Our Customer Service Representatives are available to help you.

    <br/><br/>
    Please read the terms and conditions for Airline Credits Redemptions at <a href="[WebSiteAddress]">[WebSiteAddress]</a> about how you are provided your redeemed items. To view your Airline Credits balance, please <a href="[EMLink]">click here</a>
    <br/>
    <img src=cid:AirlineCredits.jpg/>
</body>
</div>
4

1 回答 1

3

HTML 电子邮件很痛苦——它没有任何内在的东西,但因为微软决定让 Outlook 2007、2010 和 2013 使用 Word 糟糕的 HTML 呈现实现(而 Outlook 2003 使用的是 IE)。

Outlook 对浮动框的支持很差,因此我建议在这种情况下不要使用它。

无论如何,通常我是一个网络标准狂热者——但在 HTML 电子邮件中这似乎并不重要,所以我只想说使用表格,如下所示:

<table border="0"> <!-- Tim Berners-Lee, forgive me, for I have sinned. -->
    <tr>
        <td>
            <p>Please read the terms and conditions for Airline Credits Redemptions at <a   href="[WebSiteAddress]">[WebSiteAddress]</a> about how you are provided your redeemed items. To view your Airline Credits balance, please <a href="[EMLink]">click here</a></p>
        </td>
        <td> <img src=cid:AirlineCredits.jpg /> </td>
    </tr>
</table>

相对无痛,完成工作。

(并导致我死在里面)。

于 2012-09-18T18:31:57.787 回答