【问题标题】:Zoom out in the html template for gmail app on Iphone缩小 Iphone 上 gmail 应用程序的 html 模板
【发布时间】:2012-07-25 03:08:46
【问题描述】:

我正在为我的公司制作一个 html 电子邮件模板。我有一个缩小问题,它使 html 电子邮件模板的某些部分看起来比其他部分小。

我使用以下媒体查询

@media only screen and (max-device-width: 380px) {

    .mobileWidth {
      width: 290px !important; 
    }

    img { 
    max-width: 130px !important;
    max-height: 130px !important;
    }       

     .test {
       width: 290px !important;
       text-align: center !important;
     }

    .hideMobile {
      display: none;
    }           
  }  

邮件分为三部分: 1) 4-5行文本

      text
      text
      text
      text

2) 图像是小图像和文本

      -------------
      |           |      text 1
      |           |      text 2
      |   img1    |      text 3
      |           |      text 4
      -------------

3) 三个更大的图像:

                      ---------------------
                     |                    |      
                     |                    |      
                     |                    |      
                     |                    |
                     |       img2         |
                     |                    |
                     |                    |
                     |                    |
                     |                    |
                      ---------------------      


                     ---------------------
                     |                    |      
                     |                    |      
                     |                    |      
                     |                    |
                     |       img3         |
                     |                    |
                     |                    |
                     |                    |
                     |                    |
                      ---------------------   



                      ---------------------
                     |                    |      
                     |                    |      
                     |                    |      
                     |                    |
                     |       img4         |
                     |                    |
                     |                    |
                     |                    |
                     |                    |
                      ---------------------   

我面临的问题是媒体查询对于 iPhone 内置邮件帐户工作正常。

问题出在 iPhone 的 gmail 应用程序上。电子邮件的第 1 部分和第 2 部分被缩小到大约 60-65%,第 3 部分很好。

而且我正在使用最原始的 html 编码方式进行内联 CSS,因为大多数电子邮件客户端都会剥离外部 CSS 文件。

由于我有严格的保密协议,因此我无法在此处发布代码,但我认为这对于所有编写电子邮件模板的人来说一定是一个常见问题。任何提示或指示?

【问题讨论】:

    标签: html media-queries html-email email-client email-templates


    【解决方案1】:

    Gmail 会剥离媒体查询,因此如果用户通过 Gmail 应用在移动设备上查看电子邮件,他们将收到桌面视图。

    【讨论】:

      猜你喜欢
      • 2012-11-15
      • 1970-01-01
      • 2016-03-15
      • 1970-01-01
      • 2014-02-23
      • 1970-01-01
      • 2010-09-20
      • 1970-01-01
      • 2011-01-07
      相关资源
      最近更新 更多