如何将页脚固定到页面底部?
How to pin footer to the bottom of page?
我测试了很多代码来将页脚固定在页面底部 但是 none 它们中的一些有效。
这是我的页脚标签:
<footer class="container py-5 navbar-fixed-bottom">
之后的div:
<div class="row" style="height: 100%">
怎么了?为什么它不起作用?
紧急问题:求助
我正在使用 Django(如果有帮助的话)
很难说只有这几行代码但是如果你使用 bootstrap 4 和 Django 然后 bootstrap classes 将导航栏固定到底部会通常是 class="navbar fixed-bottom" 但你也可以使用 css 来做到这一点:
footer {
position: fixed;
bottom: 0;
}
希望对您有所帮助。
我测试了很多代码来将页脚固定在页面底部 但是 none 它们中的一些有效。 这是我的页脚标签:
<footer class="container py-5 navbar-fixed-bottom">
之后的div:
<div class="row" style="height: 100%">
怎么了?为什么它不起作用? 紧急问题:求助 我正在使用 Django(如果有帮助的话)
很难说只有这几行代码但是如果你使用 bootstrap 4 和 Django 然后 bootstrap classes 将导航栏固定到底部会通常是 class="navbar fixed-bottom" 但你也可以使用 css 来做到这一点:
footer {
position: fixed;
bottom: 0;
}
希望对您有所帮助。