<!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>
.container {
display: flex;
}
.box {
border: 5px solid red;
width: 33.333%;
height: 200px;
display: flex;
}
.box div {
width: 50%;
}
.box div:nth-child(1) {
background-color: yellow;
}
.box div:nth-child(2) {
background-color: green;
}
</style>
</head>
<body>
<div class="container">
<div class="box">
<div></div>
<div></div>
</div>
<div class="box">
<div></div>
<div></div>
</div>
<div class="box">
<div></div>
<div></div>
</div>
</div>
</body>
</html>
'개발일지 > HTML' 카테고리의 다른 글
CSS Flex 컨테이너 적용 총정리 (0) | 2022.11.09 |
---|---|
flex, nav, ul, article, footer 활용하기 (0) | 2022.11.09 |
수직중앙 수평중앙 중첩하기 (0) | 2022.11.09 |
줄바꿈 배치 flex-warp (0) | 2022.11.07 |
정방향 세로배치, 역방향 세로배치 - flex-direction (0) | 2022.11.07 |
댓글