这是页面: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/