gpt4 book ai didi

html - 页脚在页面底部上方,而不是在页面内容的底部

转载 作者:行者123 更新时间:2023-11-28 15:53:03 24 4
gpt4 key购买 nike

我试图让页脚停留在页面底部,而不是屏幕底部(固定),而是在整个页面的底部,所以你只能在滚动到底部后才能看到它。但是,由于某种原因它停留在底部之上,我似乎找不到原因...... fiddle : https://jsfiddle.net/okfudezn/

图片: enter image description here

HTML(div 没有包装等):

<div class="footer">
<a>REGISTERED NAMES AND TRADEMARKS ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS - Copyright © 2017 All rights reserved</a>
</div>

CSS:

.footer {
background-color: #4b4c46;
height: 55px;
line-height: 55px;
width: 100%;
text-align: center;
color: #e1dac5;
font-size: 14px;
}

最佳答案

只需将替换您的内容 div 高度更改为自动 updated fiddle

.content {
position: relative;
width: 650px;
height: auto;
background-color: #e6e6e6;
border: 1px solid #bcbcbc;
margin: 0 auto;
margin-bottom: 80px;
top: -100px;
}

关于html - 页脚在页面底部上方,而不是在页面内容的底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41592507/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com