代码改变世界

CSS实现浮动最底层

2012-09-04 19:16  游乐场123  阅读(496)  评论(0编辑  收藏  举报

<!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>
<script type="text/javascript"></script>
<style type="text/css">
* {margin:0;padding:0;}
/* 除IE6浏览器的通用方法 */
.rightbanner{ width:50%;height:100px;background:#000;}
.rightbanner{position:fixed;left:25%;bottom:0; }
/* IE6浏览器的特有方法 */
/* 修正IE6振动bug */
* html,* html body{background-image:url(about:blank);background-attachment:fixed}
* html .rightbanner{margin:0 auto;position:absolute;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}
</style>
</head>
<body style="height:3600px;">
<div class="rightbanner"></div>
<br/>
</body>
</html>