我们注意到了像Bronto这样的电子邮件平台
/*<![CDATA[*
中<style type="text/css">
内的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>
该行在W3C中生成cannot generate system identifier for general entity "fn"
,在Litmus中生成htmlParseEntityRef: expecting ';'