<!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;
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
background: #f6f7f8;
}
.container {
width: 100%;
height: 100%;
padding: 20px;
}
.container .card {
width: calc(25% - 40px);
height: 350px;
float: left;
margin: 20px;
background: white;
border-radius: 10px;
}
@media screen and (max-width: 1366px) {
.container .card {
width: calc(33.333333% - 40px);
}
}
@media screen and (max-width: 1025px) {
.container .card {
width: calc(50% - 40px);
}
}
</style>
</head>
<body>
<div class="container">
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
</div>
</body>
</html>