粘性页脚在较大的设备上不会粘在屏幕底部 - Bootstrap

问题描述 投票:0回答:2

我正在尝试创建一个粘性页脚,它粘在屏幕底部(不固定),并根据添加的内容量向下移动。

在较大的屏幕上,页脚不会粘住。

查看此处:http://www.bootply.com/VxVeDahZzG

javascript html css footer sticky-footer
2个回答
1
投票

我认为你需要将你身体的大小改变到100%。这是一个很好的网站,帮助我解决了这个问题。 http://ryanfait.com/sticky-footer/

他是这样做的:

* {
margin: 0;
}
html, body {
    height: 100%;
}
.wrapper {
    min-height: 100%;
    height: auto !important; 
    height: 100%;
    margin: 0 auto -155px; 
 }
.footer, .push {
    height: 155px; /* .push must be the same height as .footer */
}

您还需要将页脚移出身体才能发挥作用。


0
投票

我将其添加到我的网站,但仍然没有结果,您可以搜索mailboxtemporary.net我的网站,它已添加到我的网站我的选民,但没有任何工作可以帮助您??

© www.soinside.com 2019 - 2024. All rights reserved.