【发布时间】:2018-09-10 10:52:28
【问题描述】:
我的页脚按照我的意愿粘在页面底部,但是一旦页面上有足够的内容到达页脚,它就会与所述内容重叠。我试过使用固定和相对的位置,但都没有像我想要的那样工作。我还尝试了 StackOverFlow 上提供的其他解决方案,但到目前为止没有任何效果。这是我的代码。
附:我对 HTML 和 CSS 不是很熟悉,所以如果我遗漏了一些明显的东西,我深表歉意。
<div>
<footer>
<p class="footer">© 2018 The Chipotle Bandits. All rights reserved.</p>
</footer>
</div>
.footer {
color: white;
text-align: center;
font-size: 12px;
position: absolute;
bottom: 0;
width: 100%;
flex: 0 0 50px;
}
【问题讨论】:
-
看看这个问题是否有帮助:https://stackoverflow.com/questions/21805590/css-sticky-footer如果有,请删除你的问题。