Firefox:box-sizing和min-height [英] Firefox: box-sizing and min-height

查看:147
本文介绍了Firefox:box-sizing和min-height的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白:这是真的是错误还是我只是错过了一些东西?

I can’t understand: is this really a bug or am I just missing out something?

我有 -box 为HTML文档中的所有div设置(所有 -moz -webkit 前缀,当然)。所以这意味着div的 height 总是包含 padding 。可以合理预期 min-height 属性的行为类似。但显然,在Firefox中它不是。

I have box-sizing: border-box set for all my div within an HTML document (with all the -moz and -webkit prefixes, of course). So it means the height of a div always includes its padding. It’s reasonable to expect the min-height property to act similarly. But apparently, in Firefox it doesn’t.

我的意思是,当我有一个div,没有 height (例如 height:auto ),但是 min-height (比如说,220px)和 padding (例如,10px),它导致div的总高度为240px,而不是Firefox的220!

I mean, when I have a div with no height set (i.e. height: auto), but with a min-height (say, 220px) and padding (say, 10px), it results in the overall height of the div being 240px instead of 220 in Firefox! It stays alright either way in Chrome and Opera, though.

这应该不是固定的,还是一些我不能得到的功能? / p>

Shouldn’t this be fixed, or is it some sort of a feature which I don’t get?

推荐答案


...这是一个错误...
这不应该是固定的,是一些
种我不能得到的功能吗?

…is this really a bug… Shouldn’t this be fixed, or is it some sort of a feature which I don’t get?

它将被修复(这是一个错误,而不是一个功能)。

但是现在你应该对这个
错误

如果是任何安慰 min- / max-width 似乎工作正常。

这篇关于Firefox:box-sizing和min-height的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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