Div宽度限制? [英] Div width limit?
问题描述
我知道这个问题可能有点奇怪,但我只是不知道,不能找到任何信息(soo也许问题不存在)和我构建页面,其中div宽度依赖于用户。是否有一些div宽度限制?
可以使用div例如:
I know this question may be a bit strange, but I just don't know and can't find any information (soo maybe problem doesn't exist) and I build page where div width is dependent on the user. Is there some div width limit? Can div be for example:
width:1000000px?
width:1000000px?
推荐答案
在Chrome和Firefox中,由于浏览器处理 width
和 height
通过css。我找到了此帖子,在Chrome和Firefox的调试工具中使用inspect元素后。
In both Chrome and Firefox there appears to be a limit due to the way the browsers process width
and height
through css. I found this post about it, after using the inspect element in both Chrome and Firefox' debugging tools.
与帖子相反,我发现最大值 17895698
for Firefox, 33554428
for Chrome。
Contrary to the post, I found maximum values of 17895698
for Firefox, and 33554428
for Chrome.
这里也有几个 Bugzilla关于遇到相同问题的人:
报告1 报告2 。
Here are also a couple "bug" reports on Bugzilla about people running into the same issue: Report 1 Report 2.
他们在一个(对于Gecko / Firefox引擎)中说,
As they say in one (for Gecko/Firefox engines),
Gecko中的CSS长度最多限制为(1 < -1 app单位,其中1 <<30被视为无限值。应用程式单元是CSS像素的1/60。长度大于此值有效地溢出用于存储长度的整数数据类型。
CSS lengths in Gecko are limited to at most (1<<30)-1 app units, with 1<<30 treated as an infinite value. App units are 1/60 of a CSS pixel. Lengths larger than that effectively overflow the integer datatype used to store lengths.
((1 << 30)-1)/ 60 == 17895697
((1<<30)-1)/60 == 17895697
这是我们支持的CSS px中最大的CSS长度。
which is the maximum CSS length, in CSS px, that we support, effectively.
这篇关于Div宽度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!