日期:2014-05-17  浏览次数:20734 次

为什么这个没效果?

<head>
<style>
body {
height:1000px;
}
#footer {
position:fixed;
left:0;
bottom:0;
height:30p;
width:100%;
background:#999;
_position: absolute;
_top: expression( document.documentElement.clientHeight + ( document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) - this.offsetHeight )
}
</style>
</head>
<body>
<div id="footer">23</div>
</body>

------解决方案--------------------
楼主説的什么效果?


层随滚动条移动?


需要在DTD格式运行

<!doctype html><head>
<style>
body {
height:1000px;
}
#footer {
position:fixed;
left:0;
bottom:0;
height:30px;
width:100%;
background:#999;
_position: absolute;
_top: expression( document.documentElement.clientHeight + ( document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) - this.offsetHeight )
}
</style>
</head>
<body>
<div id="footer">23</div>
</body>