1.直接上代码
<!DOCTYPE html>
<html lang="zh">
<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>
body,
p {
margin: 0;
}
.parent {
display: flex;
}
.child {
flex: 1;
height: 100px;
}
.child {
margin-right: 14px;
}
.child:last-child {
margin-right: 0;
}
</style>
</head>
<body>
<div class="parent" style="background-color: #ffff;">
<div class="child" style="background-color: #1180FD;"></div>
<div class="child" style="background-color: #1180FD;"></div>
<div class="child" style="background-color: #1180FD;"></div>
<div class="child" style="background-color: #1180FD;"></div>
</div>
</body>
</html>
2.效果展示