디자인
소개
- webstandard
- 01_layout
- 02_layout
- layout02_01.html : 1. float으로 레이아웃 구성하기
- layout02_02.html : 2. float으로 레이아웃 구성하기 - 반응형
- layout02_03.html : 3. flex로 레이아웃 구성하기
- layout02_04.html : 4. flex로 레이아웃 구성하기 - 반응형
- layout02_05.html : 5. grid로 레이아웃 구성하기
- layout02_05.html : 6. grid로 레이아웃 구성하기 - 반응형
코드
<!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">
<title>레이아웃 유형02</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: #E8F5E9;
}
#wrap {
width: 1200px;
margin: 0 auto;
}
#header {
width: 1200px;
height: 100px;
background-color: #C8E6C9;
}
#nav {
width: 1200px;
height: 100px;
background-color: #A5D6A7;
}
#main {
width: 1200px;
overflow: hidden;
}
#aside {
width: 300px;
height: 780px;
background-color: #81C784;
float: left;
}
#section {
width: 600px;
height: 780px;
background-color: #66BB6A;
float: left;
}
#article {
width: 300px;
height: 780px;
background-color: #4CAF50;
float: left;
}
#footer {
width: 1200px;
height: 100px;
background-color: #43A047;
}
</style>
</head>
<body>
<div id="wrap">
<div id="header"></div>
<div id="nav"></div>
<div id="main">
<div id="aside"></div>
<div id="section"></div>
<div id="article"></div>
</div>
<div id="footer"></div>
</div>
</body>
</html>
<!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">
<title>레이아웃 유형02</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: #E8F5E9;
}
#wrap {
width: 1200px;
margin: 0 auto;
}
#header {
width: 100%;
height: 100px;
background-color: #C8E6C9;
}
#nav {
width: 100%;
height: 100px;
background-color: #A5D6A7;
}
#main {
width: 100%;
overflow: hidden;
}
#aside {
width: 30%;
height: 780px;
background-color: #81C784;
float: left;
}
#section {
width: 40%;
height: 780px;
background-color: #66BB6A;
float: left;
}
#article {
width: 30%;
height: 780px;
background-color: #4CAF50;
float: left;
}
#footer {
width: 100%;
height: 100px;
background-color: #43A047;
}
/* 미디어쿼리 */
@media (max-width: 1300px){
#wrap {
width: 96%;
}
}
@media (max-width: 768px){
#wrap {
width: 100%;
}
#aside {
width: 30%;
height: 630px;
}
#section {
width: 70%;
height: 630px;
}
#article {
width: 100%;
height: 150px;
}
}
@media (max-width: 480px){
#aside {
width: 100%;
height: 200px;
}
#section {
width: 100%;
height: 430px;
}
}
</style>
</head>
<body>
<div id="wrap">
<div id="header"></div>
<div id="nav"></div>
<div id="main">
<div id="aside"></div>
<div id="section"></div>
<div id="article"></div>
</div>
<div id="footer"></div>
</div>
</body>
</html>
<!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">
<title>레이아웃 유형02</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: #E8F5E9;
}
#wrap {
width: 1200px;
margin: 0 auto;
}
#header {
height: 100px;
background-color: #C8E6C9;
}
#nav {
height: 100px;
background-color: #A5D6A7;
}
#main {
display: flex;
}
#aside {
width: 30%;
height: 780px;
background-color: #81C784;
}
#section {
width: 40%;
height: 780px;
background-color: #66BB6A;
}
#article {
width: 30%;
height: 780px;
background-color: #4CAF50;
}
#footer {
height: 100px;
background-color: #43A047;
}
/* 미디어쿼리 */
@media (max-width: 1300px){
}
@media (max-width: 768px){
}
@media (max-width: 480px){
}
</style>
</head>
<body>
<div id="wrap">
<header id="header"></header>
<nav id="nav"></nav>
<main id="main">
<aside id="aside"></aside>
<section id="section"></section>
<article id="article"></article>
</main>
<footer id="footer"></footer>
</div>
</body>
</html>
<!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">
<title>레이아웃 유형02</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: #E8F5E9;
}
#wrap {
width: 1200px;
margin: 0 auto;
}
#header {
height: 100px;
background-color: #C8E6C9;
}
#nav {
height: 100px;
background-color: #A5D6A7;
}
#main {
display: flex;
}
#aside {
width: 30%;
height: 780px;
background-color: #81C784;
}
#section {
width: 40%;
height: 780px;
background-color: #66BB6A;
}
#article {
width: 30%;
height: 780px;
background-color: #4CAF50;
}
#footer {
height: 100px;
background-color: #43A047;
}
/* 미디어쿼리 */
@media (max-width: 1300px){
#wrap {
width: 96%;
}
}
@media (max-width: 768px){
#wrap {
width: 100%;
}
#main {
flex-wrap: wrap;
}
#aside {
width: 30%;
height: 630px;
}
#section {
width: 70%;
height: 630px;
}
#article {
width: 100%;
height: 150px;
}
}
@media (max-width: 480px){
#aside {
width: 100%;
height: 200px;
}
#section {
width: 100%;
height: 430px;
}
}
</style>
</head>
<body>
<div id="wrap">
<header id="header"></header>
<nav id="nav"></nav>
<main id="main">
<aside id="aside"></aside>
<section id="section"></section>
<article id="article"></article>
</main>
<footer id="footer"></footer>
</div>
</body>
</html>
<!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">
<title>레이아웃 유형02</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: #E8F5E9;
}
#wrap {
width: 1200px;
margin: 0 auto;
}
#header {
height: 100px;
background-color: #C8E6C9;
}
#nav {
height: 100px;
background-color: #A5D6A7;
}
#main {
display: grid;
grid-template-columns: 30% 40% 30%;
grid-template-rows: 780px;;
}
#aside {
background-color: #81C784;
}
#section {
background-color: #66BB6A;
}
#article {
background-color: #4CAF50;
}
#footer {
height: 100px;
background-color: #43A047;
}
/* 미디어쿼리 */
@media (max-width: 1300px){
}
@media (max-width: 768px){
}
@media (max-width: 480px){
}
</style>
</head>
<body>
<div id="wrap">
<header id="header"></header>
<nav id="nav"></nav>
<main id="main">
<aside id="aside"></aside>
<section id="section"></section>
<article id="article"></article>
</main>
<footer id="footer"></footer>
</div>
</body>
</html>
<!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">
<title>레이아웃 유형02</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: #E8F5E9;
}
#wrap {
width: 1200px;
margin: 0 auto;
}
#header {
height: 100px;
background-color: #C8E6C9;
}
#nav {
height: 100px;
background-color: #A5D6A7;
}
#main {
display: grid;
grid-template-columns: 30% 40% 30%;
grid-template-rows: 780px;
}
#aside {
background-color: #81C784;
}
#section {
background-color: #66BB6A;
}
#article {
background-color: #4CAF50;
}
#footer {
height: 100px;
background-color: #43A047;
}
/* 미디어쿼리 */
@media (max-width: 1300px){
#wrap {
width: 96%;
}
}
@media (max-width: 768px){
#wrap {
width: 100%;
}
#main {
grid-template-areas:
"aside section"
"article article"
;
grid-template-columns: 30% 70%;
grid-template-rows: 680px 150px;
}
#aside {
grid-area: aside;
}
#section {
grid-area: section;
}
#article {
grid-area: article;
}
}
@media (max-width: 480px){
#main {
grid-template-areas:
"aside"
"section"
"article"
;
grid-template-columns: 100%;
grid-template-rows: 200px 430px 150px;
}
}
</style>
</head>
<body>
<div id="wrap">
<header id="header"></header>
<nav id="nav"></nav>
<main id="main">
<aside id="aside"></aside>
<section id="section"></section>
<article id="article"></article>
</main>
<footer id="footer"></footer>
</div>
</body>
</html>