twitter-bootstrap 响应式 Bootstrap 粘性页脚高度
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16935166/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Responsive Bootstrap Sticky Footer Height
提问by AlGallaf
When the window is resized, the height of the footer expands but not the background color. Help!
调整窗口大小时,页脚的高度会扩大,但背景颜色不会。帮助!
http://twitter.github.io/bootstrap/examples/sticky-footer.html
http://twitter.github.io/bootstrap/examples/sticky-footer.html
采纳答案by albertedevigo
height: autoseems to solve the problem. You can include it with a media query for small viewports:
height: auto似乎解决了问题。您可以将其包含在小视口的媒体查询中:
@media only screen and (max-device-width: 480px) {
#footer {
height: auto;
}
}
回答by cfx
Your demo doesn't work anymore but the best Bootstrap sticky footer I've found is: https://gist.github.com/aalaap/3066704
您的演示不再起作用,但我发现的最好的 Bootstrap 粘性页脚是:https: //gist.github.com/aalaap/3066704

