一个固定于页面底部的层(IE6无抖动)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

<title>一个固定于页面底部的层</title>

<style type="text/css">

body{background-image:url(text.txt); /*for IE6 防抖,也可以用一张图片URL,是否存在这文件无所谓*/  

    background-attachment:fixed;   /* 这句是关键之一:一定要fixed,不能用scroll */

}

.fixedNav{

 border:#F00 1px solid;

 width: 1003px;

 position:fixed;

 bottom:0;

 left:0;

 z-index:999;

 overflow:visible;  

 /* for IE6 */

 _left:expression((document.body.offsetWidth-1003)/2);

 _top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);

 _position:absolute;

 /* for IE6 */

}

</style>

</head>

 

<body>

<div style="height:1000px">一个固定于页面底部的层</div>

<div style="width:1003px; margin:0 auto; height:50px; background-color:#000">

 <div class="fixedNav">我在这里</div>

</div>

</body>

</html>

 

本博客所有文章如无特别注明均为原创。作者:sysdee复制或转载请以超链接形式注明转自 成功志
原文地址《一个固定于页面底部的层(IE6无抖动)
分享到:更多

相关推荐

发表评论

路人甲 表情
看不清楚?点图切换 Ctrl+Enter快速提交

网友评论(0)