开发者

IE8 style.top limited to 1342177?

Found this rather strange bug in IE8; element.style.top is limited to 1342177 pixels. Even though an elem开发者_JAVA百科ent will rarely grow this large, it is not impossible. And when it does things break. (I am an unfortunate victim)

Any possible work arounds you guys can think of?


Good catch! This seems to be a new limitation in IE8 that wasn't present in previous versions. It occurs even in IE7-compatibility and Quirks modes.

It's not just top: it seems to affect all CSS lengths. Looks like a number-parsing problem, in that I can get a larger measurement by using another unit, but the number is still the maximum (eg. 1342177em gives the same height as 2000000em).

You can also put a positioned element with top: (more)px; inside another positioned element with top: 1342177px;, of course.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜