<legend id='QQuqR'><style id='QQuqR'><dir id='QQuqR'><q id='QQuqR'></q></dir></style></legend>

    <small id='QQuqR'></small><noframes id='QQuqR'>

      <bdo id='QQuqR'></bdo><ul id='QQuqR'></ul>
    <tfoot id='QQuqR'></tfoot>
    <i id='QQuqR'><tr id='QQuqR'><dt id='QQuqR'><q id='QQuqR'><span id='QQuqR'><b id='QQuqR'><form id='QQuqR'><ins id='QQuqR'></ins><ul id='QQuqR'></ul><sub id='QQuqR'></sub></form><legend id='QQuqR'></legend><bdo id='QQuqR'><pre id='QQuqR'><center id='QQuqR'></center></pre></bdo></b><th id='QQuqR'></th></span></q></dt></tr></i><div id='QQuqR'><tfoot id='QQuqR'></tfoot><dl id='QQuqR'><fieldset id='QQuqR'></fieldset></dl></div>

      1. 为 Gmail 设置 HTML 电子邮件样式

        时间:2023-11-28

                <bdo id='sTb9i'></bdo><ul id='sTb9i'></ul>

                    <tbody id='sTb9i'></tbody>
                1. <i id='sTb9i'><tr id='sTb9i'><dt id='sTb9i'><q id='sTb9i'><span id='sTb9i'><b id='sTb9i'><form id='sTb9i'><ins id='sTb9i'></ins><ul id='sTb9i'></ul><sub id='sTb9i'></sub></form><legend id='sTb9i'></legend><bdo id='sTb9i'><pre id='sTb9i'><center id='sTb9i'></center></pre></bdo></b><th id='sTb9i'></th></span></q></dt></tr></i><div id='sTb9i'><tfoot id='sTb9i'></tfoot><dl id='sTb9i'><fieldset id='sTb9i'></fieldset></dl></div>
                  <tfoot id='sTb9i'></tfoot>

                  <small id='sTb9i'></small><noframes id='sTb9i'>

                  <legend id='sTb9i'><style id='sTb9i'><dir id='sTb9i'><q id='sTb9i'></q></dir></style></legend>
                  本文介绍了为 Gmail 设置 HTML 电子邮件样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在生成使用内部样式表的 html 电子邮件,即

                  I'm generating a html email that uses an internal stylesheet, i.e.

                  <!doctype html>
                  <html>
                  <head>
                    <style type="text/css">
                      h2.foo {color: red}    
                    </style>
                  </head>
                  <body>
                   <h2 class="foo">Email content here</foo>
                  </body>
                  </html>
                  

                  在 Gmail 中查看时,内部样式表中的所有样式似乎都被忽略了.似乎 Gmail 忽略了除内联规则之外的所有样式,例如

                  When viewed in Gmail it seems all the styles in the internal stylesheet are ignored. It seems Gmail ignores all styles other than inline rules, e.g.

                   <h2 style="color: red">Email content here</foo>
                  

                  这是我在使用 Gmail 查看时设置 HTML 电子邮件样式的唯一选择吗?

                  Is this my only option for styling HTML emails when viewed with Gmail?

                  推荐答案

                  截至 2016 年 9 月 30 日,此处的答案已过时.Gmail 目前是 推出对 style 标签的支持>head,以及媒体查询.如果您只关心 Gmail,那么您可以像现代开发人员一样安全地使用课程!

                  The answers here are outdated, as of today Sep 30 2016. Gmail is currently rolling out support for the style tag in the head, as well as media queries. If Gmail is your only concern, you're safe to use classes like a modern developer!

                  作为参考,您可以查看官方 gmail CSS 文档强>.

                  For reference, you can check the official gmail CSS docs.

                  附带说明,Gmail 是唯一不支持 style (参考,直到它们更新为止).这意味着您可以几乎安全地停止将样式内联.一些比较模糊的客户可能仍然需要它们.

                  As a side note, Gmail was the only major client that didn't support style (reference, until they update anyway). That means you can almost safely stop putting styles inline. Some of the more obscure clients may still need them.

                  这篇关于为 Gmail 设置 HTML 电子邮件样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                      • <bdo id='u7IJ8'></bdo><ul id='u7IJ8'></ul>
                      • <tfoot id='u7IJ8'></tfoot>
                      • <small id='u7IJ8'></small><noframes id='u7IJ8'>

                          <tbody id='u7IJ8'></tbody>

                        <i id='u7IJ8'><tr id='u7IJ8'><dt id='u7IJ8'><q id='u7IJ8'><span id='u7IJ8'><b id='u7IJ8'><form id='u7IJ8'><ins id='u7IJ8'></ins><ul id='u7IJ8'></ul><sub id='u7IJ8'></sub></form><legend id='u7IJ8'></legend><bdo id='u7IJ8'><pre id='u7IJ8'><center id='u7IJ8'></center></pre></bdo></b><th id='u7IJ8'></th></span></q></dt></tr></i><div id='u7IJ8'><tfoot id='u7IJ8'></tfoot><dl id='u7IJ8'><fieldset id='u7IJ8'></fieldset></dl></div>

                        <legend id='u7IJ8'><style id='u7IJ8'><dir id='u7IJ8'><q id='u7IJ8'></q></dir></style></legend>