<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.wrap .top {
width: 800px;
height: 100px;
background-color: purple;
display: flex;
/* 默认值 主轴方向为水平,起点在左端 */
flex-direction: row;
justify-content: space-between;
}
.wrap .top .box1 {
width: 100px;
height: 100px;
background-color: pink;
margin-left: 20px;
}
.wrap .top .box2 {
width: 100px;
height: 100px;
background-color: red;
margin-right: 20px;
}
.wrap .bot {
width: 800px;
height: 100px;
border: 1px solid red;
display: flex;
justify-content: space-around;
}
.wrap .bot div {
width: 100px;
height: 100px;
background-color: yellow;
}
</style>
</head>
<body>
<div class="wrap">
<!-- 上 -->
<div class="top">
<div class="box1">logo</div>
<div class="box2">1121381</div>
</div>
<!-- 下 -->
<div class="bot">
<div>奔驰</div>
<div>宝马</div>
<div>奥迪</div>
<div>劳斯莱斯</div>
<div>法拉利</div>
<div>路虎</div>
</div>
</div>
</body>
</html>