<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>多列布局:定宽+自适应</title>
<!-- 使用float+overflow
左侧固定+右侧自适应
-->
<!-- 通过将左边框脱离文本流,设置右边,当内容溢出元素框时,隐藏 -->
<style type="text/css">
.left{
float: left;
width: 100px;
height: 100px;
margin-right: 20px;
background-color: aqua;
}
.right{
display: flex;
justify-content: center;
overflow: hidden;
height: 100px;
background-color: red;
}
</style>
</head>
<body>
<div>
<div class="left">
<p>我在左边</p>
</div>
<div class="right">
<p>我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边我在右边</p>
</div>
</div>
</body>
</html>