<!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 {
background: tomato;
width: 1200px;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
text-align: center;
}
.container header {
background: brown;
flex: 1;
padding: 1em;
}
.container section {
display: flex;
}
.container section article {
padding: 15em 1em;
}
.container section .main {
background: gray;
order: 2;
flex: 4;
}
.container section .left {
background: yellow;
order: 1;
flex: 1;
}
.container section .right {
background: green;
order: 3;
flex: 1;
}
.container footer {
background: skyblue;
flex: 1;
padding: 1em;
}
</style>
</head>
<body>
<div class="container">
<header>Header</header>
<section>
<article class="main">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
</article>
<article class="left">Aside 1</article>
<article class="right">Aside 2</article>
</section>
<footer>Footer</footer>
</div>
</body>
</html>
'CSS입문' 카테고리의 다른 글
CSS_반응형 작업_22.04.20(Wed) (0) | 2022.04.20 |
---|---|
CSS_flex-box_22.04.19(Tue) (0) | 2022.04.19 |
CSS_flex-box_22.04.19(Tue) (0) | 2022.04.19 |
CSS_실습_연꽃마을축제_(정답)_22.04.13(Thu) (0) | 2022.04.14 |
CSS_실습_연꽃마을축제_(문제)_22.04.13(Thu) (0) | 2022.04.14 |