您的位置:首页 > Web前端 > HTML

父级div高固定 子级两个div上下 上边div高固定 下边自适应

2016-12-01 10:36 204 查看
<div class= "container">
<div class="left"></div>
<div class="right"></div>
</div>

<style>
.container{
position: relative;
width: 200px;
height: 600px;
border: 1px solid red;
}
.left{
width:100%;
height:200px;
background: gray;
}
.right{
position: absolute;
width: 100%;
top: 200px;
bottom: 0;
left: 0;
background: green;
}
</style>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  html div高自适应