使用flex设置Div的宽度和高度

时间:2018-12-03 15:57:19

标签: html css css3 flexbox

section {
  width: 100%;
  height: 592px;
  border: 1px solid blue;
  display: flex;
  flex-direction: row;
  position: relative;
}

.rt-content {
  width: 50%;
  float: right;
  border: 1px solid black;
  height: 592px;
  margin-left: auto;
}

.placeholder {
  display: flex;
  flex-direction: column;
  bottom: 0;
  top: 0 float:left;
  border: 1px solid black;
  position: absolute;
}

.child,
.subchild {
  flex: 1;
}
<section>
  <div class="placeholder">
    <div class="child">
      <div class="subchild">
        content should be placed here left bottom corner
      </div>
    </div>
  </div>
  <div class="rt-content">
    <p>asdsadfdsfsdfsdfsdfsdf</p>
  </div>
</section>

我必须使用flex 要求是-占位符的宽度和高度应基于内容的宽度和高度+左填充。...在实现此功能时需要帮助。 宽度在增加,但不在增加。需要高度和宽度以适合内容大小。

0 个答案:

没有答案
相关问题