2

我一直在创建一个 HTML 电子邮件,在 litmus 中进行了测试,除了 Outlook 2013 之外的大多数版本的 Outlook 中都可以正常工作和显示,其中项目符号图像显示在文本下方,这里是代码。

<table border="0" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top" width="15">
      <img src="https://s3-eu-west-1.amazonaws.com/dnx-sap-01/324/3/spacer.gif"  height="8" width="15">
    </td>
    <td valign="top" width="12">
      <img src="https://s3-eu-west-1.amazonaws.com/dnx-sap-01/324/3/BulletGold_Roundtest.jpg" width="7" height="11"/>
    </td>
    <td valign="top" style="font-family:Arial, Helvetica, sans-serif; color:#222222; font-size:11px;">
      <b>Guide:</b> <a href="http://www.sap.com/">How to get started with Big Data</a>
    </td>
  </tr>
  <tr>
    <td valign="top" width="15">
      <img src="https://s3-eu-west-1.amazonaws.com/dnx-sap-01/324/3/spacer.gif"  height="8" width="15">
    </td>
    <td valign="top" width="12">
      <img src="https://s3-eu-west-1.amazonaws.com/dnx-sap-01/324/3/BulletGold_Roundtest.jpg" width="7" height="11">
    </td>
    <td valign="top" style="font-family:Arial, Helvetica, sans-serif; color:#222222; font-size:11px;">
      <b>Benchmarking Assessment Tool:</b> <a href="https://valuemanagement.sap.com/Sapbenchmarking_Portal.html#ID=340" target="_blank">SAP Big Data Maturity Model</a>
    </td>
  </tr>

  <tr>
    <td valign="top" width="15">
      <img src="https://s3-eu-west-1.amazonaws.com/dnx-sap-01/324/3/spacer.gif"  height="8" width="15">
    </td>
    <td valign="top" width="12">
      <img src="https://s3-eu-west-1.amazonaws.com/dnx-sap-01/324/3/BulletGold_Roundtest.jpg" width="7" height="11">
    </td>
    <td valign="top" style="font-family:Arial, Helvetica, sans-serif; color:#222222; font-size:11px;">
      <b>Video Whitepaper:</b> <a href="http://www.sap.com/">Shining a Light on the Value of Big Data</a>
    </td>
  </tr>
</table>
4

2 回答 2

2

这很奇怪,因为它看起来应该可以正常工作......

也许尝试设置表格和所有单元格的宽度,以便总宽度加起来相同。您还可以通过使用以下内容交换行来简化代码:

  <tr>
    <td valign="top" align="right" width="27">
      <img src="https://s3-eu-west-1.amazonaws.com/dnx-sap-01/324/3/BulletGold_Roundtest.jpg" width="7" height="11" style="margin: 0; border: 0; padding: 0; display: block;" />
    </td>
    <td valign="top" width="273" style="font-family:Arial, Helvetica, sans-serif; color:#222222; font-size:11px;">
      <b>Guide:</b> <a href="http://www.sap.com/">How to get started with Big Data</a>
    </td>
  </tr>

您也应该始终display:block;在图像上使用。看看情况如何...

于 2013-09-13T13:03:06.420 回答
0

我的解决方案是完全摆脱图像,并使用 Unicode 字符&bull;“•”对图像进行编码,并将其设置为您想要的颜色、字体大小、字体粗细和填充。将文本与文本对齐比将图像与文本对齐要容易得多。

<td valign="top" width="12">
  <img src="https://s3-eu-west-1.amazonaws.com/dnx-sap-01/324/3/BulletGold_Roundtest.jpg" width="7" height="11">
</td>

用。。。来代替

<td valign="top" width="12" style="font-family:Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold; color:#ffcc33 ; padding:5px 0 0 0;">
  &bull;
</td>
于 2016-12-14T20:38:14.073 回答