小编Chr*_*ian的帖子

显示:Flex 项目超出最大宽度

我有三个项目(列)并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)

html css overflow flexbox display

1
推荐指数
1
解决办法
362
查看次数

标签 统计

css ×1

display ×1

flexbox ×1

html ×1

overflow ×1