【发布时间】:2015-11-24 13:05:10
【问题描述】:
我正在使用 Twitter Bootstrap,是否有任何页脚类?因为我不能让它停留在底部。这是我的 jsfiddle https://jsfiddle.net/fNPvf/18578/。这是页脚 CSS:
.footer-no-nav {
border-top: 1px solid #C2B8B8;
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
}
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
display: block;
}
这是我使用引导类 navbar-fixed-bottom 时的图片
解决了我的问题,不需要任何 navbar-fixed-bottom:
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
【问题讨论】:
标签: html css twitter-bootstrap footer