我要实现this example但不同之处在于,如果我的页面上有太多内容(在导航栏和页脚之间),则此内容会被缩小/压缩以适合内部(即如此页脚在所有屏幕分辨率下仍然可见,使其成为 CSS 行话中的“固定页脚”)。我正在使用 bootstrap 3.1.1,如果有人有 bootstrap 友好的解决方案,那就太好了 :)。最好!
最佳答案
您始终可以使用固定页脚,并在其下方滚动任何其他内容。 这是一个jsfiddle举个例子:
html {
min-height: 100%;
position: relative;
}
body {
margin-bottom: 1.5rem /* or whatever your fixed footer height is */
}
/* and assuming your footer has id="footer" */
#footer {
position: fixed;
bottom: 0;
height: 1.5rem;
overflow: hidden;
}
关于html - Bootstrap 固定导航栏、粘性页脚、动态缩放内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23410600/