0

我尝试在 chrome 中创建带有可滚动内容的组框:http: //jsfiddle.net/66a8V/

    <!-- language-all: lang-html -->
    <fieldset style="width:400px; height: 200px">
        <legend>Groupbox</legend>
        <div style="overflow: hidden; width:100%; height: 100%">
            <div style="overflow:scroll; width:100%; height: 100%">
                <h1>Content</h1>
                <h1>Content</h1>
                <h1>Content</h1>
                <h1>Content</h1>
                <h1>Content</h1>
                <h1>Content</h1>
                <h1>Content</h1>
            </div>
        </div>
    </fieldset>

Groupbox 大小不固定。

Fieldset 测量内部可用高度,没有图例。如何适应内部 div 大小?

4

0 回答 0