<!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>
body {
background-color: #000;
margin: 0;
}
.box {
width: 60%;
margin: 0 auto;
background-color: #fff;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.item {
flex: 0 0 24%;
height: 200px;
margin-right: calc(4% / 3);
margin-bottom: calc(4% / 3);
background-color: tomato;
}
.item:nth-child(4n) {
margin-right: 0;
}
.item:last-child {
margin-right: auto;
}
.box .item:nth-last-child(-n + 4) {
margin-bottom: 0;
}
</style>
</head>
<body>
<div class="box">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</body>
<script>
console.log(message);
var message;
</script>
</html>
12-01