<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
}
ul {
display: block;
width: 100vw;
height: 100vh;
background: orange;
display: flex;
}
.c {
flex: 1;
background: fuchsia;
}
.l,
.r {
width: 200px;
background: green;
}
.r {
background: rebeccapurple;
}
</style>
</head>
<body>
<ul>
<li class="l">1</li>
<li class="c">2</li>
<li class="r">3</li>
</ul>
</body>
</html>
效果如下: