.left {
float: left;
width: 200px;
background-color: aquamarine;
}
.right {
float: left;
width: calc(100% - 200px);
background-color: rgb(238, 199, 228);
}
.left2 {
float: left;
width: 200px;
background-color: aquamarine;
}
.right2 {
margin-left: 200px; // padding-left: 200px;
background-color: rgb(238, 199, 228);
}
.contain3 {
display: flex;
flex-direction: row;
}
.left3 {
width: 200px;
background-color: aquamarine;
}
.right3 {
width: 100%; /* width: calc(100% + 200px); */
background-color: rgb(238, 199, 228);
}
注意: flex 子项目默认shrink:1; 空间不足将缩小
网友评论