gpt4 book ai didi

html - 页脚的位置无法固定

转载 作者:太空宇宙 更新时间:2023-11-04 15:10:13 25 4
gpt4 key购买 nike

http://jsfiddle.net/L9tqk/2/

我无法将页脚放在正确的位置

<div id="logo"></div>
<div id="content">
<div id="trans">
<div id="data">
<div id="left"> </div>
<div id="right"> </div>
</div>
</div>
<div id="footer"></div>


#footer {
position:relative;
width:100%;
clear:both;
}

什么时候给

 bottom:0;

对于#footer 正常窗口它放置正确,但是当窗口大小改变时,页脚位置不正确。

最佳答案

#content #trans 中删除 position:absolute; 并为其设置 float:

DEMO

#content #trans {
background: rgba(0,0,0,0.3);
width:100%;
height:auto;
float:left;
border-radius:5px;
color:Red;
}

关于html - 页脚的位置无法固定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20697497/

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