1

我们注意到像 Bronto 这样的电子邮件 平台/*<![CDATA[*<style type="text/css">.<head>

这似乎打破了媒体查询。如果您无法删除这些标签,是否有任何技术可以在 CSS 中保留媒体查询?

编辑:来自 head 标签的 CSS。在 Litmus 测试中一切正常,然后在 Bronto

<style type="text/css">
/*<![CDATA[*/
                /* Based on The MailChimp Reset INLINE: Yes. */  
                /* Client-specific Styles */
                #outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
                body{ max-width: 600px !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0;} 
                /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/ 
                .ExternalClass {width:100%;} /* Force Hotmail to display emails at full width */  
                .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;}
                /* End reset */

                /* Some sensible defaults for images
                Bring inline: Yes. */
                img {outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;} 
                a img {border:none;} 
                .image_fix {display:block;}


                /* Hotmail header color reset
                Bring inline: Yes. */
                h1, h2, h3, h4, h5, h6 {color: black !important;}

                h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {color: blue !important;}

                h1 a:active, h2 a:active,  h3 a:active, h4 a:active, h5 a:active, h6 a:active {
                color: red !important; /* Preferably not the same color as the normal header link color.  There is limited support for psuedo classes in email clients, this was added just for good measure. */
                }

                h1 a:visited, h2 a:visited,  h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
                color: purple !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
                }

                /* Outlook 07, 10 Padding issue fix
                Bring inline: No.*/
                table td {border-collapse: collapse;}

    /* Remove spacing around Outlook 07, 10 tables
    Bring inline: Yes */
    table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; } 

.clearFloat { height:0; line-height:0; font-size:0; clear:both; overflow:hidden; }

.mobile { display: block; }
.standard { display:none; }

#maintable { max-width: 600px !important; }
#mainimage { -ms-interpolation-mode: bicubic;  }


@media (-webkit-min-device-pixel-ratio: 1.5),  
       (-o-min-device-pixel-ratio: 3/2),  
       (min-moz-device-pixel-ratio: 1.5),  
       (min-device-pixel-ratio: 1.5) {

#maintable {width: 320px !important; }  
.mobile { display:block; }
.standard { display: none; }    

td[class="headercell"] {
        background-image: url(http://aaa_320.jpg);
                background-repeat:no-repeat;
                background-position:center;
    }
td[class="headercell"] img { 
        display: none;
                visibility:hidden; 
    }

}

@media only screen 
and (min-width : 768px)  {
  /* rules for iPad in landscape orientation */
#maintable {width: 600px; }
.mobile { display: none; }
.standard { display:block; }
.overlay-banner { display:none !important; visibility:hidden !important;}

td[class="headercell"] {
        background-image: url(http://aaa_600.jpg) !important;
                background-repeat:no-repeat !important;
                background-position:center !important;
}


}


/*]]>*/
</style>

编辑 2:看起来问题与 Bronto 对电子邮件的解析和电子邮件正文中的未编码字符有关。第一个问题是在 CDATA 标记关闭后开始,在:

<td style="font-size: 10px; font-family:Arial, Helvetica, sans-serif; text-align:center; padding: 7px 0px 7px 0px;"><a href="http://app.bronto.com/public/?q=preview_message&fn=Link&t=1&ssid=432&id=agwmajpnhsj7fzetyfhllfrkilwj8&id2=aqf4i1irg6rpyamab1badjdynmrgc&subscriber_id=caulvlaikmcbywqgwfqdqxmsfhhebpo&messageversion_id=bhvfhigljqvqccuomafmrtacddzsboj&delivery_id=axenwkrevhaeugjsidrkgabifwtabfa&tid=3.AbA.CCJGeQ.DYmK.UiHM..mWut.t....a.UdSX2A.UdSX2A.4VG-Og" style="color:#4f545c;">If you have trouble viewing this e-mail click here.</a></td>

该行生成一个cannot generate system identifier for general entity "fn"in W3C 和一个htmlParseEntityRef: expecting ';'in Litmus

4

0 回答 0