请教一个布局的问题

clipboard.png

问题:怎么让箭头所指的区块占满整个红色框框的的大小~~

指定固定高度肯定不行。有没有方法trick

阅读 2k
5 个回答
display: flex;
flex-direction: column;




flex: 1

这样嘛,就可以了。

.common_good-suit {
    position: absolute;
    width: 100%;
    left: 0;
    top: 100px;
    bottom: 40px;
    background: #f3f3f3;
    overflow-y:scroll;
}

body{

height:100%;

}
div{/这个div就是那个元素/

width:100%;
min-height:100%;

}

min-height:100%

然后就是给父类什么的height都设成100%

height=clientHeight-上下高度不就行了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题