小编nic*_*292的帖子

强制 gmail 使用嵌套表中的文本颜色以获取 html 签名

我正在为客户端开发 html 电子邮件签名,我发现当文本位于从 gmail 发送的签名中的嵌套表中时,其他邮件客户端呈现文本颜色的方式似乎是一个错误。请参阅下面的示例代码。

请注意,在嵌套表中时,文本将始终默认为黑色。

我尝试为所有元素和所有元素设置文本颜色和背景颜色,但无法覆盖此错误。我可以强制文本为黄色的唯一方法是重写我的 HTML 并且根本不使用嵌套表。

<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0084C9" style="background-color: #0084C9; color: #ffff00;">
  <tbody>
    <tr>
      <td style="color: #ffff00;">Text color is honoured in parent table</td>
    </tr>
    <tr>
      <td style="color: #ffff00;">
        <table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0084C9" style="background-color: #0084C9; color: #ffff00; ">
          <tbody>
            <tr>
              <td style="color: #ffff00;">Text color is not honoured inside a nested table</td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
  </tbody>
</table>
&nbsp;
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0084C9" style="background-color: #0084C9; color: #ffff00;">
  <tbody>
    <tr>
      <td …
Run Code Online (Sandbox Code Playgroud)

html email colors apple-mail

5
推荐指数
0
解决办法
231
查看次数

标签 统计

apple-mail ×1

colors ×1

email ×1

html ×1