<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.container {
display: flex;
gap: 1rem;
padding: 1rem;
background-color: red;
color: white;
}
.box {
background-color: blue;
padding: 1rem;
}
.fx{
width: 300px;
}
</style>
</head>
<body>
<div class="container">
<div class="box fill">Fill</div>
<div class="box fx">Fixed</div>
<div class="box fx">Fixed</div>
<div class="box fx">Fixed</div>
</div>
</body>
</html>
Fixed
盒子数量不是固定的Fixed
盒子宽度是固定的Fill
盒子只有一个Fill
盒子宽度是动态的
如何让 Fill 填满剩余 Container 的宽度? 如下图