- ์ด 3๋จ์ผ๋ก ๊ตฌ์ฑ
- 1๋จ์ฉ ์ฝ๋ ๋ถ์์ ํ ์์
- ์์ด์ค ์ปคํผ ๋ธ๋ ๋ ์์ ์ ๋ฒ ๊ฐ๋ฐ ์ผ์ง์ ์ผ๋ ์ด๋ฏธ์ง ์ ๋๋ฉ์ด์
ํจ๊ณผ๊ฐ ์งค๋ฆฌ๋ ๊ฒ์ ์์
์คํ๋ฒ
์ค 1๋จ HTML
<!-- SEASON PRODUCT -->
<section class="season-product">
<div class="inner">
<img src="/./images/floating3.png" alt="Icon" class="floating floating3" />
<img src="./images/season_product_image.png" alt="" class="product" />
<div class="text-group">
<img src="./images/season_product_text1.png" alt="" class="title" />
<img src="./images/season_product_text2.png" alt="" class="description" />
<div class="more">
<a href="javascripte:void(0)" class="btn">์์ธํ ๋ณด๊ธฐ</a>
</div>
</div>
</div>
</section>
- ์ ๋ฒ ๊ฐ๋ฐ์ผ์ง์ ์ผ๋ floating3์ season-product์ ์ฎ๊ฒจ overflow:hidden ํจ๊ณผ๋ฅผ ๋ฌด์ํ๊ฒ ๋จ.
- text์ ๊ด๋ จ๋ ์ด๋ฏธ์ง๋ text-group class๋ก ๋ฌถ๊ณ ์ํ์ ๋ฐ๋ก ์ง์ , ๋ฒํผ๋ more class๋ก ๋ฐ๋ก ์ง์ .
์คํ๋ฒ
์ค 1๋จ CSS
/* SEASON PRODUCT */
.season-product {
background-image: url("../images/season_product_bg.jpg");
}
.season-product .inner {
height: 400px;
}
.season-product .floating3 {
position: absolute;
top: -200px;
right: 0;
}
.season-product .text-group {
position: absolute;
top: 110px;
right: 100px;
}
.season-product .text-group .title {
margin-bottom: 10px;
}
.season-product .text-group .description {
margin-bottom: 15px;
}
seoson-product class
- ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง๋ฅผ season_product_bg.jpg๋ก ์ง์
inner class
floating3 class
- season-product class๋ฅผ ๊ธฐ์ค์ผ๋ก ์์น ์ง์
- ์๋ก๋ถํฐ -200px ์ค๋ฅธ์ชฝ์ผ๋ก 0 ์์น์ ์ง์
text-group class
- season-product class๋ฅผ ๊ธฐ์ค์ผ๋ก ์์น ์ง์
- ์๋ก๋ถํฐ 110px, ์ค๋ฅธ์ชฝ์ผ๋ก 100px ์์น์ ์ง์
title class
- ์๋ ์ธ๋ถ์ฌ๋ฐฑ 10px ์ง์
description class
- ์๋ ์ธ๋ถ์ฌ๋ฐฑ 15px ์ง์
์คํ๋ฒ
์ค 1๋จ ์ต์ข
์์ฑ
์คํ๋ฒ
์ค 2๋จ HTML
<!-- RESERVE COFFEE -->
<section class="reserve-coffee">
<div class="inner">
<img src="./images/reserve_logo.png" alt="" class="reserve-logo" />
<div class="text-group">
<img src="./images/reserve_text.png" alt="" class="description" />
<div class="text-group">
<a href="javascript:void(0)" class="btn btn--gold">์์ธํ ๋ณด๊ธฐ</a>
</div>
</div>
<img src="./images/reserve_image.png" alt="" class="product" />
</div>
</section>
- 1๋จ๊ณผ ์ ์ฌ์ฑ์ด ํฌ๋ค.
- ๋ก๊ณ ๋ ๋ฐ๋ก ํด๋์ค ์ง์
- text ์ด๋ฏธ์ง์ ์์ธํ ๋ณด๊ธฐ ๋ฒํผ์ text-group class๋ก ์ง์
- ์ํ ํด๋์ค๋ฅผ ๋ฐ๋ก ์ง์
์คํ๋ฒ
์ค 2๋จ CSS
/* RESERVE COFFEE */
.reserve-coffee {
background-image: url("../images/reserve_bg.jpg");
}
.reserve-coffee .inner {
height: 400px;
}
.reserve-coffee .reserve-logo {
position: absolute;
top: 110px;
left: 0;
}
.reserve-coffee .text-group {
position: absolute;
top: 124px;
left: 208px;
}
.reserve-coffee .product {
position: absolute;
top: 0;
right: 0;
}
reserve-coffee class
- ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง๋ฅผ reserve_bg.jpg๋ก ์ง์
inner class
reserve-logo class
- reserve-coffee class๋ฅผ ๊ธฐ์ค์ผ๋ก ์์น ์ง์
- ์๋ก๋ถํฐ 110px, ์ผ์ชฝ์ผ๋ก๋ถํฐ 0 ์์น์ ์ง์
text-group class
- reserve-coffee class๋ฅผ ๊ธฐ์ค์ผ๋ก ์์น ์ง์
- ์๋ก๋ถํฐ 124px, ์ผ์ชฝ์ผ๋ก๋ถํฐ 208px ์์น์ ์ง์
product class
- reserve-coffee class๋ฅผ ๊ธฐ์ค์ผ๋ก ์์น ์ง์
- ์๋ก๋ถํฐ 0, ์ค๋ฅธ์ชฝ์ผ๋ก๋ถํฐ 0 ์์น์ ์ง์
์คํ๋ฒ
์ค 2๋จ ์ต์ข
์์ฑ
์คํ๋ฒ
์ค 3๋จ HTML
<!-- PICK YOUR FAVORITE -->
<section class="pick-your-favorite">
<div class="inner">
<div class="text-group">
<img src="./images/favorite_text1.png" alt="" class="title" />
<img src="./images/favorite_text2.png" alt="" class="description" />
<div class="more">
<a href="javascript:void(0)" class="btn btn--white">์์ธํ ๋ณด๊ธฐ</a>
</div>
</div>
</div>
</section>
- text ์ด๋ฏธ์ง๋ text-group class๋ก ๋ฌถ๋๋ค.
- ์์ธํ ๋ณด๊ธฐ ๋ฒํผ์ more class๋ก ๋ฌถ๋๋ค.
์คํ๋ฒ
์ค 3๋จ CSS
/* PICK YOUR FAVORITE */
.pick-your-favorite {
background-image: url("../images/favorite_bg.jpg");
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-size: cover;
}
.pick-your-favorite .inner {
padding: 110px 0;
}
.pick-your-favorite .text-group {
margin-left: 100px;
display: flex;
width: 362px;
flex-wrap: wrap;
/* ์ค๋ฐ๊ฟ ๊ฐ๋ฅ */
justify-content: flex-end;
}
.pick-your-favorite .text-group .title {
margin-bottom: 40px;
}
.pick-your-favorite .text-group .description {
margin-bottom: 40px;
}
pick-your-favorite class
- ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง๋ favorite_bg.jpg๋ก ์ง์
- ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง ๋ฐ๋ณต๋๋ ์์ฑ์ ์์ ์ค.
- ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง์ ์์น๋ฅผ ๊ฐ์ด๋ฐ๋ก ์ง์
- ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง๋ ์์ง์ด์ง ์๋๋ก ํจ.
- ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง๋ ์ฌ์ฉํ๋ ์์์ ๋ง๊ฒ๋ ํ๋ ๋๋ ์ถ์ํ๋๋ก ํ๋ค.
inner class
- ๋ด๋ถ์ฌ๋ฐฑ์ ์์๋ 110px
text-group class
- ์ผ์ชฝ ์ธ๋ถ์ฌ๋ฐฑ 100px
- ์ํ์ ๋ ฌ
- ๊ฐ๋ก 362px
- ์์๊ฐ ์ํ ์ ๋ ฌํ ๋ ๊ฝ ์ฐจ๋ฉด ์ค๋ฐ๊ฟ์ด ๊ฐ๋ฅํ๋๋ก ์ค์
- ์ค๋ฅธ์ชฝ์์ ์์๋ค์ด ์์ํ ์ ์๋๋ก ์ง์
title class
description class
์คํ๋ฒ
์ค 3๋จ ์ต์ข
์์ฑ
์คํ๋ฒ
์ค ๊ณ ์ ์ด๋ฏธ์ง ์ต์ข
์์ฑ