์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ฌ๋ผ์ด๋ ์ ํ STUDY 01
์ด๋ฒ ํฌ์คํ ์์๋ Figma์์ ๋ง๋ ์ฌ๋ผ์ด๋ ์ ํ ์น์ ์ HTML๊ณผ CSS ์ฝ๋๋ก ์ฎ๊ธฐ๋ ์์ ์ ํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
Figma
๋จผ์ ๋ง๋ค๊ณ ์ ํ๋ ์น ์ฌ์ดํธ์ ๋ชจ์์ Figma๋ผ๋ ํ๋ก๊ทธ๋จ์ ์ด์ฉํ์ฌ ์๋์ ๊ฐ์ด ๋ง๋ค์ด์ฃผ๋๋ก ํ์. ๊ทธ์ ๋์์ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ์ฉ ์์ด์ฝ SVG๋ฅผ ์ถ๋ ฅํ ํ์ด์ง๋ ๋ฐ๋ก ๋ง๋ค๋๋ก ํ๋ค. ๋ง๋๋ ๋ฐฉ๋ฒ์ ์ง๋ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ ํฌ์คํ ์ ์ฐธ์กฐํ ๊ฒ.
HTML ์์ค
์น ํ์ค ์ค์๋ฅผ ์ํด ์๋งจํฑ ํ๊ทธ๋ฅผ ์ ๊ทน ์ฌ์ฉํ๋๋ก ํ์. img ํ๊ทธ์ alt์ ๊ฐ์ ํจ๊ณผ๋ฅผ ์ฃผ๊ธฐ ์ํด ์์ด์ฝ์ด ๋ค์ด๊ฐ span ํ๊ทธ์ ํด๋์ค ๊ฐ์ "ir"๋ก ์ค์ ํ์. ์์ธํ ์ค๋ช ์ ์๋ ์์ ์ฝ๋์ ์ฃผ์์ฒ๋ฆฌ ๋ด์ฉ์ ์ฐธ์กฐํ ๊ฒ.
<body>
<section id="sliderType" class="slider__wrap">
<h2 class="blind">์ฌ๋ผ์ด๋ ์์ญ</h2>
<div class="slider__inner">
<div class="slider">
<div class="slider__img">
<div class="desc">
<span>BAKING CLASS</span>
<h3>BAKING PROJECT</h3>
<p>
๋น์ ๋ ๋ ์ ์๋ค! ์ ๋นต์ฌ ํ๋ฅญํ! <br>
๋น์ ๋ ํ ์ ์๋ค! ์ฐฝ์
ํ๊ธฐ ๋นต์ง!
</p>
<div class="btn">
<a href="#">์์ธํ ๋ณด๊ธฐ</a>
<a href="#" class="black">์ฌ์ดํธ ๋ณด๊ธฐ</a>
</div>
</div>
</div>
<div class="slider__arrow">
<a href="#" class="left"><span class="ir">์ด์ ์ด๋ฏธ์ง</span></a>
<a href="#" class="right"><span class="ir">๋ค์ ์ด๋ฏธ์ง</span></a>
</div>
<div class="slider__dot">
<a href="#" class="dot active"><span class="ir">1</span></a>
<a href="#" class="dot"><span class="ir">2</span></a>
<a href="#" class="dot"><span class="ir">3</span></a>
<a href="#" class="play"><span class="ir">ํ๋ ์ด</span></a>
<a href="#" class="stop"><span class="ir">์ ์ง</span></a>
</div>
</div>
</div>
</section>
<!-- // sliderType -->
</body>
CSS ์์ค
์์ด์ฝ ์ถ๋ ฅ์ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ์ IR ํจ๊ณผ๋ฅผ ์ ๊ทน ํ์ฉํ๋๋ก ํ๋ค. CSS ๊ณตํต ์์, ํฐํธ ์ ๋ณด ๋ฑ์ ๋ฐ๋ก ๋นผ ๋์๊ธฐ ๋๋ฌธ์ ์์ธํ ๋ณด๊ณ ์ถ๋ค๋ฉด ํ๋จ์ CSS ์์ค ๋ณด๊ธฐ ๋ฒํผ์ ๋๋ฅผ ๊ฒ.
<style>
.slider__inner {
margin-top: 30px;
}
.slider {
position: relative;
}
.slider__img {
background: url(../img/sliderType/slider_bg01.jpg) no-repeat center / cover;
}
.slider__img .desc {
width: 1160px;
margin: 0 auto;
padding: 100px 20px;
}
.slider__img .desc span {
font-size: 16px;
background: #fff;
padding: 1px 14px 0 14px;
border-radius: 30px;
text-transform: uppercase;
margin-bottom: 10px;
display: inline-block;
}
.slider__img .desc h3 {
font-size: 110px;
font-weight: 300;
line-height: 1;
color: #fff;
text-transform: uppercase;
margin-bottom: 16px;
margin-left: -8px;
}
.slider__img .desc p {
font-size: 20px;
font-weight: 300;
color: #fff;
line-height: 1.35;
margin-bottom: 130px;
}
.slider__img .desc .btn a {
font-size: 16px;
background-color: #fff;
padding: 11px 50px;
display: inline-block;
}
.slider__img .desc .btn a.black {
background: #000;
color: #fff;
}
/* ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ๋ฅผ ํตํ ์์ด์ฝ ์ถ๋ ฅ */
.slider__arrow a {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 30px;
height: 56px;
background-image: url(../img/sliderType/slider_icon.svg);
}
.slider__arrow a.left {
left: 20px;
}
.slider__arrow a.right {
right: 20px;
background-position: -50px 0;
}
.slider__dot {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 25px;
}
.slider__dot a {
display: inline-block;
width: 16px;
height: 16px;
background-image: url(../img/sliderType/slider_icon.svg);
background-position: -20px -70px;
}
.slider__dot a.active {
background-position: 0 -70px;
}
.slider__dot a.play {
background-position: -40px -70px;
}
.slider__dot a.stop {
background-position: -60px -70px;
}
</style>
์ต์ข ๊ฒฐ๊ณผ
'Site' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํธํฐ ์ ํ 01 (7) | 2022.09.05 |
---|---|
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ๋ฐฐ๋ ์ ํ 01 (6) | 2022.09.05 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ์ด๋ฏธ์ง/ํ ์คํธ ์ ํ 01 (8) | 2022.09.01 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํค๋ ์ ํ 01 (4) | 2022.09.01 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํ ์คํธ ์ ํ 03 (6) | 2022.09.01 |
๋๊ธ