+ -
当前位置:首页 → 问答吧 → html,body{overflow:hidden;}在IE6下会使页面的iframe没有滚动条

html,body{overflow:hidden;}在IE6下会使页面的iframe没有滚动条

时间:2010-11-08

来源:互联网

下面一个两行两列的常用后台页面。
顶部固定高度,左边固定宽度,高度自适应100%,右边宽度,高度均自适应100%。
在IE7,IE8,FF,下均正常。 IE6下,iframe没有滚动条。请各位同学帮忙讨论赐教一下,先谢了。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>两行两列</title> <style> html,body{ height:100%; margin:0; border:0; padding:0; overflow:hidden;} iframe{ position:absolute; _position:static;} </style> </head> <body> <div style="height:60px; width:100%; background:#eee; position:absolute; left:0; top:0;">Top</div> <div style="width:150px; background:#abc; position:absolute; left:0; top:60px; bottom:0; _height:100%;">Left</div> <div style="background:#aaa; position:absolute; left:150px; top:60px; bottom:0; right:0;"> <iframe frameborder="0" height="100%" width="100%" src="http://www.blueidea.com/" marginheight="0" marginwidth="0" scrolling="auto"></iframe> </div> </body> </html>
 提示:您可以先修改部分代码再运行
[ 本帖最后由 lingling8 于 2010-11-8 11:32 编辑 ]

作者: lingling8   发布时间: 2010-11-08

你的html都overflow:hidden了,IE6下应该就没了吧

作者: tonijoy   发布时间: 2010-11-08

这个只是把当前页的html,body给hidden了,没相屋,它把iframe里的也给hidden了。。不知道有没有什么办法呢

作者: lingling8   发布时间: 2010-11-08