【发布时间】:2011-12-10 08:49:45
【问题描述】:
我有一个页脚,它在页面底部具有固定位置,z 索引为 999999。 我的主要内容容器的长度越长,用户添加的帖子越多,如果滚动条大于页面,就会出现滚动条。如果我向下滚动主要内容的主要底部,由于 z 索引,div 隐藏在页脚后面。我尝试删除它,但现在它在顶部。主要内容展开时是否可以下推页脚?
#footer {
position:fixed;
z-index:999999;
bottom: 0;
width: 100%;
height: 50px;
margin-top: 25px;
background-color: #333;
}
#main-content {
position: absolute;
overflow: hidden;
z-index: 10;
-moz-border-radius: 8px; /* Firefox */
-webkit-border-radius: 8px; /* Safari, Chrome */
border-radius: 8px; /* CSS3 */
behavior: url('../pie/pie.htc');
border: 5px solid #0f344f;
background: #ffffff;
left: 100px;
top: 195px;
width: 600px;
height: auto;
}
【问题讨论】: