<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="all">
<div class="left">
left
</div>
<div class="right">
</div>
</div>
</body>
<style>
.all{
height: 300px;
}
.left{
width: 200px;
float: left;
background: blue;
}
/* 不设置width marge-left原则 */
.right{
margin-left: 200px;
height: 300px;
background: yellow;
/* overflow: hidden; */
}
/* bfc原则:overflow不和 浮动区域重叠 */
.right{
margin-left: 200px;
height: 300px;
background: yellow;
/* overflow: hidden; */
}
</style>
</html>

1-1,父元素display:table,子元素display:table-cell,设置固定宽度(常用)

css布局——左侧宽度固定,右侧自适应_html

css布局——左侧宽度固定,右侧自适应_html_02