雅虎将高度转换为最小高度 [英] Yahoo transforms height into min-height

查看:74
本文介绍了雅虎将高度转换为最小高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我偶然发现Yahoo邮件将所有height属性转换为min-height的事实.有解决方法吗?

I have just stumbled across the fact that Yahoo mail is transforming all height attributes into min-height. Is there a workaround for this?

<div style="width:55px; height:55px; overflow:hidden;">
   <img alt="user pic" src="assets/main.jpeg" width="55px" />
</div>

以上代码的目标是,如果图像底部高于55像素,则将其隐藏.我已经在hotmail和aol中对此进行了测试,并且效果很好.只有Yahoo似乎将我的身高变成了最小身高:

The goal of the code above is to hide the bottom part of the image if it's higher than 55px. I've tested this in hotmail and aol and it works fine. Only Yahoo seems to transform my height into min-height:

<div style="width:55px; min-height:55px; overflow:hidden;">

推荐答案

截至2019年5月,Yahoo邮件仍将内联样式height转换为min-height,所以我发现解决方法是添加max-height也可以使用内联样式,那么它将起作用.

As of now in May-2019 the Yahoo mail still transforms inline style height to min-height so what i have found as workaround is add max-height also in your inline style then it will works.

在我的情况下,我的html中有图像,我只希望将其高度设置为30px,但是 yahoo将高度转换为最小高度.

in my case i have image in my html and i just want it's height to set to 30px but yahoo transforms the height to min-height.

所以它正在变成更大的图像,但我希望它变小,所以我已经以内联样式应用了max-height并且有效了.

so it is becoming larger image but i want it to smaller so i have applied max-height in inline style and it worked.

请参阅下面的img标记,我已以内联样式应用了max-height.

see my img tag below i have applied max-height in inline style.

<img src="<?php echo $url->assets ?>img/checked.png" style="height:30px;float: left;max-height:30px;" />

这篇关于雅虎将高度转换为最小高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆