几件事:1.您正在测试什么浏览器/客户端? IOS 将作出响应;但是,Android 的本机应用程序没有(Android 4.4)。
2. 不要使用 h1, h2, . . . p 标签。他们的响应因电子邮件客户端而异。将所有样式应用到包含<td>。
这是我开始大多数单栏电子邮件的默认标题。它可以处理您在使用 yahoo、ios 和 Outlook 时可能遇到的许多黑客攻击。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>One Column Mobile Friendly Template</title>
<style>
/*------------------------------------*\
EMAIL CLIENT SPECIFIC STYLES
\*------------------------------------*/
.ReadMsgBody, .ExternalClass { width:100%; } /* Force Hotmail/Outlook.com to display emails at full width */
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height:100%; } /* Force Hotmail/Outlook.com to display normal line spacing */
body, table, td, p, a, li, blockquote { -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; } /* Prevent WebKit and Windows mobile from changing default text sizes */
table, td { mso-table-lspace:0pt; mso-table-rspace:0pt; } /* Removes spacing between tables in Outlook 2007 and up */
img { -ms-interpolation-mode:bicubic; } /* Allows smoother rendering of resized images in Internet Explorer */
.footer a { color:/*#ffffff*/; text-decoration:none; } /* Add this class to the system footer to change the unsubscribe link ---does not work for Gmail--- */
.iOSfix a { color:/*#ffffff*/; text-decoration:none; } /* Override the default blue link style that iOS puts on address and phone numbers */
.iOSfixaside a { color:/*#000000*/; text-decoration:none; } /* Alternate Style - Override the default blue link style that iOS puts on address and phone numbers */
.em-dragdrop-dummy { display:none!important; }
/*------------------------------------*\
RESET STYLES
\*------------------------------------*/
body { min-width:100% !important; }
html { width:100%; }
img { border:0; height:auto; line-height:100%; outline:none; text-decoration:none; }
table { border-collapse:collapse !important; }
body, .emWrapperTable, .emWrapperCell { height:100% !important; margin:0; padding:0; }
.mobileHeaderWidth .em-dockitem-empty, .mobileFooterWidth .em-dockitem-empty, .emWrapperTable, .emWrapperCell { width:100% !important; }
div { padding:0px !important; }
h1, h2, h3, h4, h5, h6 { display:block; margin:0px; }
/*------------------------------------*\
MOBILE STYLES
\*------------------------------------*/
@media only screen and (max-device-width: 720px) {
td[class="mobileHeaderCell"],
td[class="mobileColumnCell"],
td[class="mobileFooterCell"] { display:block !important; }
table[class="mobileHeaderWidth"],
table[class="mobileColumnWidth"],
table[class="mobileFooterWidth"],
td[class="mobileHeaderCell"],
td[class="mobileColumnCell"],
td[class="mobileFooterCell"] {width:480px!important;}
/* general display styles */
td {box-sizing:border-box; }
span[class="mHide"] { display:none!important; }
span[class="mBreak"] { display:block!important; }
p[class="mCenter"] { text-align:center!important; margin:0px 1em!important; }
/* link styles */
/* image styles */
img[class="mFullImage"] { width:100%!important; height:auto!important; }
img[class="mImgCenter"] { margin:0px auto!important; }
}
@media only screen and (max-device-width: 479px) {
table[class="mobileHeaderWidth"],
table[class="mobileColumnWidth"],
table[class="mobileFooterWidth"],
td[class="mobileHeaderCell"],
td[class="mobileColumnCell"],
td[class="mobileFooterCell"] { width:320px!important; }
/* general display styles */
/* link styles */
/* image styles */
}
</style>
</head>