【发布时间】:2014-06-13 04:34:39
【问题描述】:
使用 Bootstrap 3 (http://www.patrickmanser.ch/fnws) 在网站上工作,我想编写一个粘性页脚。我应用了 Bootstrap 3 示例中使用的代码,并将它们调整为我的尺寸。它在桌面显示器上完美运行。但是,如果您切换到移动尺寸的屏幕,页脚会与内容重叠。我猜,这是因为页脚的大小(高度)也发生了变化,因为我在那里使用了网格系统。你可以看一下源代码(main.css),但我认为最重要的部分是这些:
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 237px;
overflow-y: scroll;
background-color: #eee;
}
#page-footer {
position: absolute;
bottom: 0;
min-height: 200px;
background-color: #333;
width: 100%;
color: #999;
}
.copyright {
background-color: #222;
min-height: 50px;
color: #666;
width: 100%;
text-align: center;
line-height: 50px;
}
我不知道如何解决这个问题,或者是否可以正确解决。任何提示都非常感谢!
【问题讨论】:
标签: html css twitter-bootstrap