我通常熟悉使用CSS刷新页脚的技术.
但我很难让这种方法适用于Twitter bootstrap ,很可能是因为Twitter bootstrap 本质上是响应性的.使用Twitter bootstrap,我无法使用上述博文中描述的方法将页脚刷新到页面底部.
我通常熟悉使用CSS刷新页脚的技术.
但我很难让这种方法适用于Twitter bootstrap ,很可能是因为Twitter bootstrap 本质上是响应性的.使用Twitter bootstrap,我无法使用上述博文中描述的方法将页脚刷新到页面底部.
发现snippets here非常适合 bootstrap
HTML:
<div id="wrap">
<div id="main" class="container clear-top">
<p>Your content here</p>
</div>
</div>
<footer class="footer"></footer>
CSS:
html, body {
height: 100%;
}
#wrap {
min-height: 100%;
}
#main {
overflow:auto;
padding-bottom:150px; /* this needs to be bigger than footer height*/
}
.footer {
position: relative;
margin-top: -150px; /* negative value of footer height */
height: 150px;
clear:both;
padding-top:20px;
}