我一直在 Gmail 中调试和测试电子邮件模板。我使用 Zurb Foundation 作为基础(我也用它来内联我的大部分 CSS)。它在任何地方看起来都很好,但是 Gmail 完全忽略了我的媒体查询(soblue 类是测试它是网格还是媒体查询)。
我研究了 Gmail 媒体查询支持(它应该适用于 iOS)并且我还验证了我的 CSS。这是 style 标签中的 CSS:
@media only screen and (max-width: 596px) {
.soblue {
color: #0000FF !important;
}
.small-float-center {
margin: 0 auto !important; float: none !important; text-align: center !important;
}
.small-text-center {
text-align: center !important;
}
.small-text-left {
text-align: left !important;
}
.small-text-right {
text-align: right !important;
}
table.body img {
width: auto; height: auto;
}
table.body center {
min-width: 0 !important;
}
table.body .container { …Run Code Online (Sandbox Code Playgroud)