
页面中出现了文字和div覆盖区域重叠的情况。这样的排版是如何实现的呢?
问题中提供的代码使用了三横排的布局,如下所示:
https://www.stgeorges.edu.ar/quilmes/history
立即学习“前端免费学习笔记(深入)”;
这种排版是怎么实现的?
如下三张图, 为什么文字和div覆盖区域会重叠?
重叠的原因在于.content-container这个类。它添加了margin-top:-40px的样式,导致这个盒子向上移动,遮住了文字。
css代码如下:
.content-container {
margin-top: -40px;
}要解决这个问题,可以将margin-top属性设为0。
.content-container {
margin-top: 0;
}










