小编Lij*_*eph的帖子

孩子不留在父母divs内

小提琴:https : //jsfiddle.net/uatzust3/

这是解决我的问题的小提琴,您将观察到孩子没有留在父div内card,并且我也希望divs占用他们没有接受的父的全宽。

另外,我应该在哪里学习最佳做法?我是社区的新手。提前致谢。

左div (black_container)内容不足,但(content_container)在停留在carddiv 内时应始终根据右div的宽度排列高度。

.card {
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.30), 0 15px 15px rgba(0, 0, 0, 0.22);
  max-width: 800px;
  margin: auto;
  position: relative;
}
.black_container {
  height: inherit;
  background: #333;
  display: inline-block;
  vertical-align: top;
  padding: 3%;
  font-family: 'Nunito', sans-serif;
}
.content_container {
  display: inline-block;
  padding: 3%;
  /* position: absolute;
    top:0;
    bottom: 0; */
}
.small_bar {
  padding: 3px;
  width: 30px;
  margin: 0 …
Run Code Online (Sandbox Code Playgroud)

html css css3 grid-system

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

标签 统计

css ×1

css3 ×1

grid-system ×1

html ×1