gpt4 book ai didi

html - 底部 div 不会在浏览器调整大小时重新定位

转载 作者:太空宇宙 更新时间:2023-11-04 02:58:59 24 4
gpt4 key购买 nike

底部 div,.lower 在调整屏幕大小时不会将自身重新定位到页面底部。这是因为 position:absolute; 吗?

https://jsfiddle.net/q1p4dp4b/

#lower {    
width: 100%;
position: absolute;
bottom: 0;}

enter image description here

EDIT 添加了 position:fixed; 但文本会分层

enter image description here

最佳答案

你想要position: fixed。这使它粘在视口(viewport)的底部并在您滚动时停留在那里。

关于html - 底部 div 不会在浏览器调整大小时重新定位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31643630/

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