【发布时间】:2016-04-14 04:15:17
【问题描述】:
我正在尝试将页脚放在页面底部,而不是粘在页面底部。我将底部设置为 0px,但是当页面太长时,我的页脚停留在顶部而不是页面底部。此外,我的页脚一直坚持使用我的徽标,而不是位于页面底部。我应该怎么做才能解决这个问题?
.logo {
display: block;
z-index: 20;
height: 200px;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
}
footer {
width: 100%;
background: rgba(0,0,0,0.6);
bottom: 0;
}
HTML
<footer class="footer">
<div class="container text-center">
<h4>Follow Us On Social Media!</h4>
<a href="#"><i class="fa fa-facebook-square fa-3x" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-twitter-square fa-3x"></i></a>
<a href="#"><i class="fa fa-google-plus-square fa-3x"></i></a>
<a href="#"><i class="fa fa-instagram fa-3x" aria-hidden="true"></i></a>
</div><!--End container-->
</footer><!--End footer 2-->
感谢您的帮助!
【问题讨论】:
-
添加到页脚位置:固定