实现如图效果
<!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>
*{
margin: 0;
padding: 0;
}
.box{
width:100%;
height: 100px;
}
@media (min-width:576px) {
.box1{
width: 100%;
}
.box2,.box3,.box4,.box5{
width: 50%;
}
}
@media (min-width:768px) {
.box1{
width: 66.6%;
}
.box2,.box3,.box4,.box5{
width: 33.3%;
}
}
@media (min-width:992px) {
.box1{
width:36%;
flex-grow: 1;
}
.box2,.box3,.box4,.box5{
width: 16%;
flex-grow: 2;
}
}
</style>
<link rel="stylesheet" href="./dist/css/bootstrap.css">
</head>
<body>
<div class="container d-flex flex-wrap">
<div class="box box1 bg-primary">1</div>
<div class="box box2 bg-danger">2</div>
<div class="box box3 bg-info">3</div>
<div class="box box4 bg-warning">4</div>
<div class="box box5 bg-success">5</div>
</div>
</body>
</html>