我有三个项目(列)并display: flex设置margin-left为它们。当我调整窗口大小并向右滚动时,它们将超出框/窗口(溢出)。第二个问题-第三张图片的高度不同,即使我设置max-height了它。这只是代码的一部分(即使在这里问题也会再次出现):
body {
margin: 0;
width: 100%;
}
.background {
position: relative;
width: 100%;
height: 1000px;
background-color: gray;
}
.articleContainer {
position: relative;
display: flex;
width: 100%;
height: 600px;
}
.content {
position: relative;
display: flex;
margin-left: 10%;
border-top: 7px solid rgb(227, 0, 26);
height: 600px;
background-color: black;
top: -4px;
width: 333px;
}
.content img {
top: 0;
max-height: 230px;
width: 333px;
}
.box {
position: absolute;
width: 60px;
height: 60px;
top: 0; …Run Code Online (Sandbox Code Playgroud)