
4个回答
展开全部
这样就OK 了,望采纳, Class "foot" 你可以改成你自己要的类名
* html,* html body /* 修正IE6振动bug */{background-image:url(about:blank);background-attachment:fixed;}
.foot{ position:fixed; bottom:0px; height:30px; background:#666;}
* html .foot /* IE6 底部固定 */{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
* html,* html body /* 修正IE6振动bug */{background-image:url(about:blank);background-attachment:fixed;}
.foot{ position:fixed; bottom:0px; height:30px; background:#666;}
* html .foot /* IE6 底部固定 */{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
展开全部
把下面代码保存为html即可:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<style type="text/css">
<!--
#overlay {
Z-INDEX: 9999; POSITION: fixed; TEXT-ALIGN: center; WIDTH: 100%; BOTTOM: 0px; HEIGHT: 80px; _position: absolute
}
-->
</style>
<script type="text/javascript">
for(var i=0;i<100;i++){
document.write(i+"<br>");
}
</script>
<div id='overlay'><a href="#dg"><IMG border=0 alt="" src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif"></a></div>
<!--[if IE 6]>
<script type="text/javascript">
(function(){
var overlay = document.getElementById('overlay'), t;
window.onscroll = function() {
t && clearTimeout(t);
t = setTimeout(function() {
// reflow
overlay.className = overlay.className;
}, 13);
};
})();
</script>
<![endif]-->
</div>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<style type="text/css">
<!--
#overlay {
Z-INDEX: 9999; POSITION: fixed; TEXT-ALIGN: center; WIDTH: 100%; BOTTOM: 0px; HEIGHT: 80px; _position: absolute
}
-->
</style>
<script type="text/javascript">
for(var i=0;i<100;i++){
document.write(i+"<br>");
}
</script>
<div id='overlay'><a href="#dg"><IMG border=0 alt="" src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif"></a></div>
<!--[if IE 6]>
<script type="text/javascript">
(function(){
var overlay = document.getElementById('overlay'), t;
window.onscroll = function() {
t && clearTimeout(t);
t = setTimeout(function() {
// reflow
overlay.className = overlay.className;
}, 13);
};
})();
</script>
<![endif]-->
</div>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
相对于body浮动就对了,置底
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
position:fixed,然后加top/bottom,left/right值试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |