html - 订阅者电子邮件 : GMail is converting height to min-height

标签 html css email gmail

这是向 Google 用户发送电子邮件时看似已知的问题:Google 将所有“高度”声明更改为“最小高度”。这意味着堆叠的图像不再无间隙地相互“接触”。

有没有人知道一个好的解决方法?

这是一个例子:

<div style="height:244px">
    <img src="http://www.domain.com/images/top.gif" alt="" />
</div>
<div style="height:266px">
    <img src="http://www.domain.com/images/bottom.gif" alt="" />
</div>

在 GMail 中显示如下:

<div style="min-height:244px">
    <img src="http://www.domain.com/images/top.gif" alt="" />
</div>
<div style="min-height:266px">
    <img src="http://www.domain.com/images/bottom.gif" alt="" />
</div>

所以不是这个:

enter image description here

在 GMail 中,两张相互堆叠的图片看起来像这样:

enter image description here

必须有一个简单的解决方法吗?

最佳答案

我刚刚遇到了这个问题并通过设置 max-height 解决了它,它不会混淆。

关于html - 订阅者电子邮件 : GMail is converting height to min-height,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6711165/

相关文章:

html - 为什么尽管使用了防弹@face-font 语法,我还是无法设置字体?

html - 设置元素的语言属性会导致子元素出现 unicode 字符样式错误

css - 使 flex 元素拉伸(stretch)全高并垂直居中其内容

php - Mysql PHP推荐

php - 有没有办法用PHP来检查我的邮件内容是否是垃圾邮件?

android - Android 上的 HTML5 <audio> 标签

php - JavaScript 和 PHP 复选框全选

html - 未对齐 "outline",div 数量不均匀

email - 电子邮件中 Assets 的绝对路径,在 Symfony2 中没有请求对象

javascript - 使用 jquery 获取表中特定行的下拉列表的值