【问题标题】:Embedded CSS not working in Gmail嵌入式 CSS 在 Gmail 中不起作用
【发布时间】:2016-09-19 12:37:40
【问题描述】:

根据最新的 Gmail 文档,支持嵌入式 CSS:https://developers.google.com/gmail/design/css

但是,我将他们的示例复制到文件 css.html 中

<html>
  <head>
    <style>
      .colored {
        color: blue;
      }
      #body {
        font-size: 14px;
      }
    </style>
  </head>
  <body>
    <div id='body'>
      <p>Hi Pierce,</p>
      <p class='colored'>This text is blue.</p=>
      <p>Jerry</p>
    </div>
  </body>
</html>

并通过命令行发送:

cat css.html  | mail -s "$(echo -e "Test\nContent-Type: text/html")" me@example.com

无论是在 Gmail 网站还是在 Gmail 应用程序中,它们都无法正常工作并显示为纯文本。有什么想法吗?

【问题讨论】:

    标签: css email gmail html-email email-client


    【解决方案1】:

    很遗憾,它尚未推出。您引用的文档将在“本月晚些时候”发布后得到支持。 (ref - gmail 谷歌博客 09/14/16)

    从本月晚些时候开始,Gmail 和 Inbox by Gmail 将支持 使用响应式设计创建的电子邮件,这意味着其内容适应 适合各种尺寸的屏幕。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-19
      • 2012-03-06
      • 2016-05-30
      • 2015-06-21
      • 1970-01-01
      • 2015-01-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多