css把div框固定在屏幕的下面,兼容IE6 做单站时用的

来源:互联网 发布:凯妮和安知的合成配方 编辑:程序博客网 时间:2024/06/03 15:57
 
<!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>无标题文档</title><style type="text/css"> .ddd{width:80%;margin:0 auto;position:fixed;_position:absolute;bottom:0;background-color:#F00;height:100px;_margin-top: -1px; /*--Prevents IE6 from having an infinity scroll bar - due to 1px border on #footpanel--*/_top:expression(eval(document.compatMode &&document.compatMode=='CSS1Compat') ?documentElement.scrollTop+(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));}</style></head> <body style="height:2000px;"><div class="ddd"></div></body></html>

原创粉丝点击