Css 页脚,不固定在底部,与页面一起滚动
这是我的页面 因此,页脚位于Include php中Css 页脚,不固定在底部,与页面一起滚动,css,width,footer,Css,Width,Footer,这是我的页面 因此,页脚位于Include php中 #footer { position: fixed; bottom: 0; z-index: 1000; left: 0px; right:0px; width: 100%; background: #c9c9c9; height: 125px; color: #868686; text-align: center; border-top: 3px sol
#footer {
position: fixed;
bottom: 0;
z-index: 1000;
left: 0px;
right:0px;
width: 100%;
background: #c9c9c9;
height: 125px;
color: #868686;
text-align: center;
border-top: 3px solid #EBEBEB;
}
页脚需要位于页面底部(如堆栈溢出),而不是与页面一起滚动
有人知道答案吗
position:fixed;
left: 0px; bottom:0px; right:0px;
background: #c9c9c9;
color: #868686;
border-top: 3px solid #EBEBEB;
text-align: center; z-index: 1000;
这样做,并且您在第1465行第二次定义了#页脚您希望页脚宽度等于浏览器宽度还是位置固定不工作页脚需要是此网站上的页脚(stackoverflow),因此无论屏幕大小如何,其在屏幕上的百分比都是100%。添加右侧:0px;-成功了!谢谢你没有在你的页面中添加position:fixed。尽管它现在出现了另一个问题,但页脚并没有位于底部,它与页面一起滚动。页脚仍然跟随页面的滚动。所以将其从php include中删除,并将其放在页眉div上方?你是在开玩笑吗,你给出的链接现在已经固定了页脚(在mozilla firefox中尝试)不,即使在mozilla(我主要使用chrome)中,它仍然会随页面滚动。页脚必须位于页面底部(因此,如果向下滚动,您只能看到页脚)