IE 7中的溢出问题

时间:2010-03-24 19:30:04

标签: 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中,溢出内容不会被隐藏。

1 个答案:

答案 0 :(得分:0)

将display:none添加到内部div,它将被隐藏。我认为你错误地理解溢出的使用:虽然隐藏......

<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>