我需要一些关于 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/