<!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 {
font-family: 'Noto Sans KR', sans-serif;
margin: 0;
background-color: yellow;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.container {
width: 1000px;
height: 700px;
background-color: #eee;
display: flex;
justify-content: center;
align-items: center;
}
section {
background-color: #ddd;
width: 600px;
height: 400px;
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<div class="container">
<section>
<h1 >수직중앙 수평중앙 중첩하기</h1>
</section>
</div>
</body>
</html>
'개발일지 > HTML' 카테고리의 다른 글
flex, nav, ul, article, footer 활용하기 (0) | 2022.11.09 |
---|---|
flex활용한 색구분하기 (0) | 2022.11.09 |
줄바꿈 배치 flex-warp (0) | 2022.11.07 |
정방향 세로배치, 역방향 세로배치 - flex-direction (0) | 2022.11.07 |
정방향 가로배치, 역방향 가로배치 - flex-direction (0) | 2022.11.07 |
댓글