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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 17:17:59  来源:igfitidea点击:

Responsive Bootstrap Sticky Footer Height

htmlcsstwitter-bootstrapresponsive-designsticky-footer

提问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.htmlSticky Footer Bootstrap

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