0

I need to make a really big div, in order of millions of pixels.

Searching I found this thread that proves that IE can manage up to 10.000.000 of px.

Determine Maximum Possible DIV Height

But in my test IE 10 can't size a div more than 1.533.917 px.

This is my test: jsfiddle test

The value between brackets is the size that I try to set and the previous value is the computed size of the div calculated with jquery.

The question is: Why IE can't size a div more than 1.533.917 px in my test?

This is the js that makes the div bigger:

$(document).ready(function () {
    var interval = setInterval(function () {

        height  += 10000;
        width   += 10000;

        $(".sujeto").css({width: width, height: height});
        $(".contador").text( "Width: " + ( $(".sujeto").width() ) + "px (" + width + ") - Height: " + ( $(".sujeto").height() ) + "px (" + height + ")");

    }, 100);

});
4

1 回答 1

0

这种情况的任何解决方案。下面的链接准确地演示了这个问题。这个例子不是我创建的 Nathan Williams。

<div style="width: 500px; height: 500px; overflow: auto;">
    <div style="width: 500px; height: 10000000px; overflow: hidden; position: relative;">
        <span style="left: 0px; top: 0px; position: absolute;">top</span>
        <span style="left: 0px; top: 1193030px; position: absolute;">IE8 limit (approximate)</span>
        <span style="left: 0px; top: 1533900px; position: absolute;">IE10 limit (approximate)</span>
        <span style="left: 0px; top: 9999950px; position: absolute;">bottom</span>
    </div>
</div>

http://jsfiddle.net/Bckbr/

于 2015-12-13T20:07:32.647 回答