CSS-右侧高度自适应
2022-01-23 Web
div{
border: 1px solid black;
}
/*position*/
.left{
height: 100%;
width: 100px;
background: aqua;
position: absolute;
}
.right{
width: 300px;
margin-left: 110px;
background: antiquewhite;
}
.parent{
position: relative;
}
div{
border: 1px solid black;
}
/*position*/
.left{
height: 100%;
width: 100px;
background: aqua;
position: absolute;
}
.right{
width: 300px;
margin-left: 110px;
background: antiquewhite;
}
.parent{
position: relative;
}
/*margin负值*/
.parent{
overflow: hidden;
}
.left,.right{
margin-bottom: -5000px;
padding-bottom: 5000px;
}
.left{
float: left;
background: aqua;
}
.right{
float: right;
background: antiquewhite;
}
/*margin负值*/
.parent{
overflow: hidden;
}
.left,.right{
margin-bottom: -5000px;
padding-bottom: 5000px;
}
.left{
float: left;
background: aqua;
}
.right{
float: right;
background: antiquewhite;
}
/*flex布局*/
.parent{
display: flex;
display: -webkit-flex;
display: -o-flex;
display: -moz-flex;
display: -ms-flex;
align-items: stretch;
}
.left{
background: aqua;
}
.right{
margin-left: 110px;
background: antiquewhite;
}
/*flex布局*/
.parent{
display: flex;
display: -webkit-flex;
display: -o-flex;
display: -moz-flex;
display: -ms-flex;
align-items: stretch;
}
.left{
background: aqua;
}
.right{
margin-left: 110px;
background: antiquewhite;
}
版权属于: vincent
转载时须注明出处及本声明