gpt4 book ai didi

html - 手动设置高度时div重叠

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

这是页面:https://hamzicabdulah.github.io/Raptitude/

当手动设置“other-stories”div 的高度时,“other-stories”和“footer”类的 div 重叠:

.other-stories {
height: 65%;
}
@media screen and (min-width: 768px) {
.other-stories {
height: 89%;
}
}

如果我删除上面的代码,div 就不会重叠。考虑到“其他故事”div 的手动设置高度需要留在那里才能在 Firefox 中正常工作,这里的解决方法是什么?

最佳答案

将 float 设置为页脚和其他文章。

.other-stories {
height: 65%;
float:left;
}
@media screen and (min-width: 768px) {
.other-stories {
height: 89%;
float:left;
}
}

关于html - 手动设置高度时div重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41307079/

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