+ -
当前位置:首页 → 问答吧 → IE6 下position:relative 问题

IE6 下position:relative 问题

时间:2011-08-25

来源:互联网

二话不说,看代码:
<!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=utf-8" /> <title>ie6,7 position:relative bug</title> <style type="text/css"> body { margin:0;} #content { height:300px; background:#f60; } #footer { position:relative; height:80px;top:400px; background:#f96; } </style> </head> <body> <div id="content">this is content</div> <div id="footer">this is footer</div> </body> </html>
 提示:您可以先修改部分代码再运行
IE6下footer就木有见了,滚动条也木有。改变top值为200,才会出来。

作者: xmlovedoudou   发布时间: 2011-08-25

你是想说明什么呢?

作者: trista0516   发布时间: 2011-08-25

如果把top:400px;改成200px就能显示出来了,好像超出一屏之后ie6没有显示出来了,也没有滚动条

[ 本帖最后由 lihuiluhuijie 于 2011-8-25 12:46 编辑 ]

作者: lihuiluhuijie   发布时间: 2011-08-25