html
<!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>
<link rel = "stylesheet" href = "./css/style.css">
</head>
<body>
<div class="header">
</div>
<div class="container">
<div class="main">
<div class="message">
<h1>명륜진사갈비</h1>
맛있어요 명륜진사갈비갈비갈비
</div>
</div>
<div class="contents">
<div class="section">
<div class="subtitle">subtitle 1</div>
<div>
<img src="/img/snowman.png" width="30%" height="auto" alt="snowman.png">
</div>
<div class="article">
따뜻한 유소년에게서 같지 꽃 대중을 웅대한 생의 것이다.보라, 풀이 이것이다.
피가 사람은 힘차게 곳으로 약동하다. 보배를 있는 시들어 청춘이 착목한는
지혜는 충분히 주며, 구할 사막이다.
</div>
</div>
<div class="section">
<div class="subtitle">subtitle 2</div>
<div class="article">
따뜻한 유소년에게서 같지 꽃 대중을 웅대한 생의 것이다.보라, 풀이 이것이다.
피가 사람은 힘차게 곳으로 약동하다. 보배를 있는 시들어 청춘이 착목한는
지혜는 충분히 주며, 구할 사막이다.
</div>
</div>
<div class="section">
<div class="subtitle">subtitle 3</div>
<div class="article">
따뜻한 유소년에게서 같지 꽃 대중을 웅대한 생의 것이다.보라, 풀이 이것이다.
피가 사람은 힘차게 곳으로 약동하다. 보배를 있는 시들어 청춘이 착목한는
지혜는 충분히 주며, 구할 사막이다.
</div>
</div>
</div>
</div>
<div class="footer">
충청북도 청주시 청원구 율량로 tel. 000
</div>
</body>
</html>
css
* {
margin: 0;
padding: 0;
}
.header {
width: 100%;
height: 10vh;
background-color: bisque;
}
.container{
width: 1300px;
margin: 0 auto;
height: calc(100vh - 13vh);
}
.main {
position: relative;
width: 100%;
height: 40%;
background-image: url("/img/csit-sa-hero-1200x400.jpg");
background-size: cover;
}
.message {
position: absolute;
top: 50%;
left: 50%;
color: white;
font-size: 1.5rem;
transform: translate(-50%, -50%); /*가운데로 맞추기 위해, 이렇게 하는 이유는 표준화를 위해*/
}
.message h1 {
font-size: 3rem;
}
.contents {
width: 100%;
height: 60%;
}
.section {
float: left;
width: 30%;
height: 90%;
margin: 1.5%;
border: 1px solid gainsboro;
border-radius: 0.5rem;
box-shadow: 0.5rem 0.5rem 10px lightgray; /*10px는 블러*/
}
.subtitle{
padding: 0.8rem;
font-family: Arial, Helvetica, sans-serif;
font-size: 1.5rem;
font-weight: 700;
text-align: center;
border-bottom: 1px solid gainsboro;
}
.article {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 1.1rem;
padding: 0.8rem;
float: left;
}
img { /*앞에 .아니다 클래스아니니까*/
margin: 0.2rem;
float: left;
}
.footer{
width: 100%;
height: 5vh;
background-color: bisque;
padding: 2rem;
text-align: center;
}
'Frontend > CSS' 카테고리의 다른 글
마진과 패딩 (0) | 2021.11.29 |
---|---|
팁 (0) | 2021.11.29 |
position relative (0) | 2021.11.22 |
반응형 웹, 레이아웃 (0) | 2021.11.18 |
06 (0) | 2021.11.15 |
댓글