Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ExtJS 4.2:layout=auto时的Div-inside-span标记_Javascript_Extjs_Extjs4.2 - Fatal编程技术网

Javascript ExtJS 4.2:layout=auto时的Div-inside-span标记

Javascript ExtJS 4.2:layout=auto时的Div-inside-span标记,javascript,extjs,extjs4.2,Javascript,Extjs,Extjs4.2,我正试图理解这样做背后的原因 <fieldset id="fieldset-1015" class="x-fieldset x-fieldset-with-title x-fieldset-with-header x-fieldset-default" style="border-width:0;"> <legend id="fieldset-1015-legend" class="x-fieldset-header x-fieldset-header-default"

我正试图理解这样做背后的原因

<fieldset id="fieldset-1015" class="x-fieldset x-fieldset-with-title x-fieldset-with-header x-fieldset-default" style="border-width:0;">
    <legend id="fieldset-1015-legend" class="x-fieldset-header x-fieldset-header-default">
    <div id="fieldset-1015-body" class="x-fieldset-body ">
        <span id="fieldset-1015-outerCt" style="display: table; width: 100%; table-layout: fixed;">
            <div id="fieldset-1015-innerCt" class="" style="display:table-cell;height:100%;vertical-align:top;">
            </div>
        </span>
    </div>
</fieldset>

我知道这是一个很有争议的问题。但是我想理解为什么ExtJS选择这种方式来处理他们的布局

在其他布局(如layout=container)中,我看不到跨度内的div

内联元素中的块元素将在以下问题中讨论(以及更多问题)——


您的问题的答案在代码注释中(来源:):

// All browsers that support display:table use this template.
// An outerCt with display:table shrink-wraps contents, and contains child
// margins. The table-cell innerCt is required in order to support percentage
// heights on child elements. Originally the outerCt started out as a div, but
// was changed to a span to work around an obscure firefox 3.6 bug where
// placing a Container inside of a fieldset's legend element causes the legend
// to blow up if the outerCt is a div.