html - 电子邮件后备 Outlook Gmail

标签 html css email outlook gmail

你好聪明的 friend 们。

我正在尝试为电子邮件客户端设置回退系统。看完这篇HTML Emails: fallback for mso conditional?和其他很棒的博客,我似乎仍然遗漏了一些东西。我能够让电子邮件在 Outlook 中正确显示,但在 Gmail 中仍然呈现 VML,这给了我两个图像。

 <table border="0" cellpadding="0" cellspacing="0" width="100%" >
    <tr>
        <td></td>
        <td rowspan=2 class="desktop">

                <!--[if mso]>
                    <v:rect style="width:600px;height:281px;" strokecolor="none">
                        <v:fill type="tile" color="#363636" src="http://www.frugi.org/emailpi/assets/header.jpg" /></v:fill>
                    </v:rect>
                    <v:shape id="someName" style="position:absolute;width:600px;height:281px;">
                        <p style="font-family:Georgia; font-size:13px;"><h2 style="color:Red;">Text Over Image Hack!!!</h2></p>
                    </v:shape>
                    <div style="width:0px; height:0px; overflow:hidden; display:none; visibility:hidden; mso-hide:all;">
                <![endif]-->
                    <img src="_PT_icon_personalize_05.png"  style="width:0; overflow:hidden; display:none; float:left" >
                <!--[if mso]>
                    </div>
                <![endif]-->
        </td>
    </tr>
    <tr>
        <!--[if mso]>
                <div style="width:0px; height:0px; overflow:hidden; display:none; visibility:hidden; mso-hide:all;">
        <![endif]-->
        <td colspan=2 ><h2 style="color:Red;max-width:480px; width:0; overflow:hidden; display:none;">Text Over Image Hack!!!</h2></td>
        <!--[if mso]>
            </div>
        <![endif]-->
    </tr>
</table>

我是不是漏掉了什么?

展望

enter image description here

谷歌邮箱

enter image description here

最佳答案

谢谢约翰!!!

<!-- BANNER -->
<table cellpadding="0" cellspacing="0" border="0" height="281" width="100%">
    <tr>
        <td background="http://www.frugi.org/emailpi/assets/header.jpg" bgcolor="#7bceeb" valign="top">
        <!--[if gte mso 9]>
        <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:598;height:281px;">
        <v:fill type="tile" src="http://www.frugi.org/emailpi/assets/header.jpg" color="#7bceeb" />
        <v:textbox inset="0,0,0,0">
        <![endif]-->
                            <div>

                            </div>
        <!--[if gte mso 9]>
        </v:textbox>
        </v:rect>
        <![endif]-->
    </td>
</tr>


关于html - 电子邮件后备 Outlook Gmail,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23221388/

相关文章:

php - 在 Symfony2 上创建多色选择框

java.lang.NoClassDefFoundError : com/sun/mail/util/MailLogger while trying to send e-mail from JAX-WS

ruby-on-rails-3 - Ruby on Rails with Sorcery 重置密码电子邮件出现未定义方法错误

HTML CSS : How to align grid to content area?

javascript - Angular Material 的登录表单

html - 如何让一个div填满所有水平空间

javascript - 添加内联样式以使用react

html - 表格单元格中文本后的 float 图像

javascript - 当字符插入输入文本框时制表符光标

javascript - AWS Lambda : Unable to import module 'mail' : No module named mail