2015-06-12 39 views
0

我正在尝试创建一个粘到页面底部(不固定)的粘页脚,并根据添加的内容向下移动。粘滞的页脚不粘到屏幕底部的较大设备上 - 引导

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

查看这里:http://www.bootply.com/VxVeDahZzG

+0

所以它总是在那里,不管你滚动多远?像 - http://www.cssplay.co.uk/layouts/basics2.html –

+0

@MatthewHammond - 不,我只是希望它留在页面的底部。 - 除非你在页面底部 – RandomMath

+1

不应该在滚动的视图,但它已经做到了? http://www.sonirepairs.com/ – TheOnlyError

回答

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

我已经试过,它似乎没有任何区别 – RandomMath

+0

你把你的脚注在你的身体之外吗? –

+0

是的我没有区别 – RandomMath