小编C. *_*man的帖子

为什么 Gmail 会忽略我的媒体查询?(在 iOS 上)

我一直在 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)

html css gmail email-templates ios

6
推荐指数
2
解决办法
8741
查看次数

标签 统计

css ×1

email-templates ×1

gmail ×1

html ×1

ios ×1