我的页脚卡在内容div中
代码https://jsfiddle.net/rfh7jomp/
尝试了position:relative ;,但是在较小的页面中不会放在底部。
如果重要的话,使用引导程序。
HTML代码:
<div class="footer">
<div class="container">
<p>footer text</p>
</div>
</div>
CSS代码:
.footer
{
position: absolute;
clear:both;
bottom: 0;
width: 100%;
height: 30px;
padding:3px;
text-align:center;
background-color:rgba(111, 111, 111, 0.65);
border-top:1px solid #bbb;
color:#F3F3F3;
}
如果您使用的是Bootstrap 3.2.0,则只需将类添加navbar-fixed-bottom
到您的footer
类中,然后position: absolute;
从中删除.footer
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句