When using flex element layout, the child can not set the height of how to do?

1. Using absolute positioning

html

	<div class="wrap">  
        <div class="header">头部</div>  
        <div class="main">  
            <div class="container">内容</div>  
        </div>  
        <div class="footer">尾部</div>  
    </div>

css

html,body{
	width:100%;
	height:100%;
}
.wrap{
	width:100%;
	height:100%;
}
.header,.footer{
	height:40px;
}
.main{
	display:flex;
	postion:relative;
}
.container{
	position:absolute;
	width:100%;
	height:100%;
}

other

Collating my own learning process read books and other books ready to watch, we want to help, the next will continue to update up new books:
tc5.us/dir/24655972-37630821-7fb57f

Published 25 original articles · won praise 31 · views 110 000 +

Guess you like

Origin blog.csdn.net/qq_33236453/article/details/78376205