<body>
<div id="wrap">
<div id="header"></div>
<div id="nav"></div>
<div id="main">
<div id="aside"></div>
<div id="article1"></div>
<div id="article2">
<div id="article2-1"></div>
<div id="article2-2"></div>
</div>
</div>
<div id="footer"></div>
</div>
<!--
layout03_01 : float 방식 레이아웃
layout03_02 : float 방식 반응형 레이아웃
layout03_03 : flex 방식 레이아웃
layout03_04 : flex 반응형 방식 레이아웃
layout03_05 : grid 방식 레이아웃
layout03_06 : grid 방식 반응형 레이아웃
-->
</body>
* {
margin: 0;
padding: 0;
}
body {
background-color: #E1F5FE;
}
#wrap {
width: 1200px;
margin: 0 auto;
}
#header {
height: 100px;
background-color: #b3e5fc;
}
#nav {
height: 100px;
background-color: #81D4FA;
}
#main {
display: flex;
flex-wrap: wrap;
flex-direction: column;
height: 780px;
}
#aside {
width: 30%;
height: 780px;
background-color: #4FC3F7;
}
#article1 {
width: 70%;
height: 260px;
background-color: #29B6F6;
}
#article2-1 {
width: 100%;
height: 260px;
background-color: #03A9F4;
}
#article2-2 {
width: 100%;
height: 260px;
background-color: #039BE5;
}
#footer {
height: 100px;
background-color: #0288D1;
}
/* 미디어 쿼리 */
@media (max-width : 1300px){
#wrap {
width: 96%;
}
#article2 {
display: flex;
}
#article2-1 {
width: 50%;
height: 520px;
}
#article2-2 {
width: 50%;
height: 520px;
}
}
@media (max-width : 768px){
#wrap {
width: 100%;
}
#article1 {
width: 100%;
height: 390px;
}
#article2-1 {
width: 100%;
height: 390px;
}
#article2-2 {
display: none;
}
}
@media (max-width : 480px){
#aside {
width: 100%;
height: 200px;
}
#article1 {
height: 430px;
}
#article2-1 {
height: 150px;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.