<!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>
<!-- flex 기능 -->
<style>
* {
margin: 0;
padding: 0;
}
section {
width: 1070px;
height: 800px;
background-color: #ccc;
display: flex;
/* flex 속성은 float처럼 옆으로 콘텐츠를 배치할 수 있음. */
flex-wrap: wrap;
/* 줄바꾸기. flex-wrap이 없으면 자식 width를 무시함. */
justify-content: space-between;
align-content: flex-start;
}
section div {
width: 260px;
height: 200px;
border: 1px solid black;
box-sizing: border-box;
margin-bottom: 10px;
}
</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>