弹性布局

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.box{
height: 500px;
background-color: bisque;
position: relative;
display: flex;
}
.box .box-left {
margin-left: 10px;
flex: 0 0 200px; /* 参数分别是 放大,缩小 初始大小 */
background-color: pink;
}
.box .box-right {
margin-left: 10px;
margin-right: 10px;
height: 100%;
background-color: green;
}
header,footer {
height: 75px;
background-color: aqua;
}
</style>
</head>
<body>
<header>
 
</header>
<div class="box">
<div class="box-left">
11
</div>
<div class="box-right">
1shishsihsishsihi是不变的沙发电视柜很多水果和客1111111111111111111111户的感慨的沙发电视柜很多水果和客户的感慨
        大苏打撒郭德纲你只是 第三个大概了解斯大林经过拉丝几个垃圾
</div>
</div>
<footer>
 
</footer>
</body>
</html>
原文地址:https://www.cnblogs.com/wsl-/p/10711806.html