【问题标题】:Outlook CSS background-color of table cell表格单元格的 Outlook CSS 背景颜色
【发布时间】:2016-05-19 18:56:58
【问题描述】:

以下简单的 CSS 可在多个邮件客户端中使用,但颜色和字体粗细未在 Outlook 2016 中应用。

<style type="text/css">
table {width: 100%}
td:first-child {background-color: #FFDAB9 ; width: 17%; font-weight:bold}
</style>

宽度设置被尊重,所以我的结论是支持first-child伪类。

如何控制background-colorfont-weight

【问题讨论】:

  • 尽管您得出结论,但似乎可能不支持 first-child - campaignmonitor.com/css/b
  • 很奇怪。不确定如何应用 width 设置。

标签: css outlook css-selectors


【解决方案1】:

WC3 表格中背景颜色的标准是bgcolor(已弃用)和background

td:first-child {bgcolor:#FFDAB9; background:#FFDAB9;}

fiddle here

【讨论】:

【解决方案2】:

因为 Outlook 使用 Word 来呈现电子邮件,所以它对 CSS 的支持非常有限,
你可以在这个网站上喜欢:Campagign Monitor 表示:first-child CSS 选择器不支持 Outlook 2016。

要解决此问题,请尝试使用内联 CSS 样式或为您的 HTML 元素指定类名。

编码愉快!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-15
    • 1970-01-01
    • 2015-11-29
    • 1970-01-01
    • 2014-10-08
    • 2022-12-12
    相关资源
    最近更新 更多