Notice
Recent Posts
Recent Comments
Link
초짜코딩의 잡동사니
layout - 6 (flex) 본문
ㄴ
<style>
* {
margin: 0;
}
body {
background-color: #FFF3E0;
}
#wrap {
width: 1200px;
margin: 0 auto;
}
#header {
width: 100%;
height: 100px;
background-color: #FFE0B2;
}
#nav {
width: 100%;
height: 100px;
background-color: #FFCC80;
}
#main {
display: flex;
}
#aside {
flex: 0 0 30%;
height: 780px;
background-color: #FFB74D;
}
#contents {
flex: 0 0 70%;
height: 780px;
background-color: #FFA726;
}
#footer {
width: 100%;
height: 100px;
background-color: #FF9800;
}
@media (max-width:1300px){
#wrap {
width: 96%;
}
}
@media (max-width:768px){
#wrap {
width: 100%;
}
}
@media (max-width:480px){
#main {
display: block;
}
#aside {
width: 100%;
height: 300px;
}
#contents {
width: 100%;
height: 480px;
}
}
</style>
<div id="wrap">
<header id="header"></header>
<nav id="nav"></nav>
<main id="main">
<aside id="aside"></aside>
<section id="contents"></section>
</main>
<footer id="footer"></footer>
</div>
'Layout > 반응형' 카테고리의 다른 글
layout - 7 (grid) (0) | 2022.04.17 |
---|---|
layout - 7 (float) (0) | 2022.04.17 |
layout -7 (flex) (0) | 2022.04.17 |
layout - 6 (grid) (0) | 2022.04.17 |
layout - 6 (flaot) (0) | 2022.04.17 |