字段集内div的溢出在Chrome

时间:2015-07-23 20:23:46

标签: html css google-chrome

这里发生了什么,这是Chrome中的错误吗?

当我引入fieldset时,嵌套div的溢出会停止在Chrome中运行。

Chrome vs IE

这是一个最小的例子。

html
head
    style(type="text/css").
        .wrapper {
            overflow: scroll;
            height: 100px;
            border: solid 1px black;
        }
        fieldset {
            margin: 0;
            padding: 0;
            border: 0;
        }

body
    form
        .wrapper
            .content aaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssdddddddddddddddddddddddd
    form
        fieldset
            .wrapper
                .content aaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssdddddddddddddddddddddddd

我已经测试了Google Chrome - Fieldset Overflow Bug提供的各种建议解决方法,但它对我不起作用。

事实证明min-width: inherit解决方法确实有效..

1 个答案:

答案 0 :(得分:0)

为您的代码明确指定overflow-x。另外,请在代码中添加width。一旦你添加了这两个,它应该正确溢出:)

如果没有宽度,它将如何知道要溢出的内容?