<!DOCTYPE html>
<html lang="ko">
<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, maximum-scale=2.0, minimum-scale=1.0, user-scalable=no">
<title>flex</title>
<!-- 여백 다루기 -->
<style>
* {margin: 0; padding: 0;}
section {
width: 100%;
background-color: #ccc;
display: flex;
flex-wrap: wrap;
/* justify-content: space-between; */
}
section div {
width: 47%; height: 200px;
border: 1px solid black; box-sizing: border-box;
margin-right: 10px;
margin-bottom: 10px;
flex-grow: 1;
}
section div:nth-child(2n) {margin: 0;}
@media all and (min-width: 321px) and (orientation: landscape) {
section div {width: 20%;}
section div:nth-child(2n) {margin-right: 10px;}
section div:nth-child(4n) {margin: 0;}
}
</style>
</head>
<body>
<section>
<div class="box01">box01</div>
<div class="box02">box02</div>
<div class="box03">box03</div>
<div class="box04">box04</div>
<div class="box05">box05</div>
<div class="box06">box06</div>
<div class="box07">box07</div>
<div class="box08">box08</div>
<div class="box09">box09</div>
<div class="box10">box10</div>
</section>
</body>
</html>