css - IE 7 中的溢出问题

标签 css overflow

我需要一些关于 IE 中 CSS 溢出的帮助,即 IE 7。我希望隐藏嵌套的 div 内容。

<div style="width:100px; height:100px; overflow:hidden; border:1px dashed red;">
    <div style="width:60px; left:80px; position:relative;">hidden stuff goes here</div>
</div>

它在 FF 中工作正常,但在 IE 7 中,溢出内容未被隐藏。

最佳答案

在内部div中添加display:none,它会被隐藏。我认为您误解了 overflow:hidden 的使用...

<div style="width:100px; height:100px; overflow:hidden; border:1px dashed red;">
        <div style="width:60px; left:80px; position:relative; display:none;">hidden stuff goes here</div>
    </div>

关于css - IE 7 中的溢出问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2510815/

相关文章:

html - css - 溢出 : hidden in div nested inside display: table-cell

php - PHP数据表的 overflow hidden

html - 滚动内滚动不起作用

css - 我在 CSS 中使用什么 Overflow 来垂直滚动

css - 将 div 内的每个元素垂直居中

html - CSS overflow-y 没有像宣传的那样工作?

html - asp.net 中的粘性页脚不起作用

javascript - html输入图片类型在maplayer下

html - HTML 文件中的 &lt;style&gt; 标签未显示在浏览器中

iframe - 将边界半径添加到 TinyMCE 文本区域