Email Fallback Outlook Gmail

蹲街弑〆低调 提交于 2019-12-25 03:16:38

问题


Hello you wonderful smart friends.

I'm trying to set a fallback system for email clients. After read this HTML Emails: fallback for mso conditional? and other great blogs I seem to be missing something still. I'm able to get the the email to display the correctly in Outlook but in Gmail the VML is still rendered which gives me two images.

 <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>

Am I missing something here?

Outlook

Gmail


回答1:


Thank you John!!!

<!-- 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>




来源:https://stackoverflow.com/questions/23221388/email-fallback-outlook-gmail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!