λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°
SITE

[SITE] μ›Ήμ‚¬μ΄νŠΈ - μŠ¬λΌμ΄λ“œ μœ ν˜•01

by _토맀토 2022. 9. 6.
728x90

SliderType01

μ›ΉνŽ˜μ΄μ§€ μ‹€μŠ΅μ„ μœ„ν•œ μŠ¬λΌμ΄λ“œ μœ ν˜•μ„ μ‹€μŠ΅ν•΄λ³΄κ² μŠ΅λ‹ˆλ‹€! 이번 μŠ¬λΌμ΄λ“œ μœ ν˜•μ€ 이미지와 ν…μŠ€νŠΈ μ˜μ—­, μ•„μ΄μ½˜μ΄ ν•¨κ»˜ λ“€μ–΄μžˆλŠ” νƒ€μž…μž…λ‹ˆλ‹€.
그럼 μ•„λž˜μ˜ μ½”λ“œλ₯Ό 보며 ν•¨κ»˜ μ‹€μŠ΅ ν•΄λ³΄κ² μŠ΅λ‹ˆλ‹€ ~ πŸ˜†


< figma : λ””μžμΈ ν•˜κΈ° >

이번 μœ ν˜•μ€ μŠ¬λΌμ΄λ“œ νƒ€μž…μœΌλ‘œ 컨셉에 λ§žλŠ” λ ˆμ΄μ•„μ›ƒκ³Ό λ””μžμΈμ„ μ„€μ •ν•˜μ‹œλ©΄ λ©λ‹ˆλ‹€. μ•„λž˜μ˜ ν”Όκ·Έλ§ˆλ₯Ό μ°Έκ³ ν•˜μ—¬ HTML, CSSλ₯Ό μ„€μ •ν•΄λ΄…μ‹œλ‹€. πŸ˜‡


< HTML μ†ŒμŠ€ : λ ˆμ•„μ•„μ›ƒ ꡬ쑰 νŒŒμ•…ν•˜κΈ° >

λ””μžμΈν•œ μ›Ή νŽ˜μ΄μ§€ μ‹œμ•ˆμ„ 보며 νŽ˜μ΄μ§€ ꡬ쑰λ₯Ό νŒŒμ•…ν•œ ν›„ μ›Ή ν‘œμ€€μ„±κ³Ό 접근성에 λ§žλŠ”μ‹œλ©˜ν‹±ν•œ λ§ˆν¬μ—…μ„ ν•΄μ€λ‹ˆλ‹€.

TIP !
β€’ μ„Ήμ…˜, 아티클과 같은 μ‹œλ©˜ν‹± νƒœκ·Έμ—λŠ” κΌ­ ν—€λ”© νƒœκ·Έλ₯Ό ν•¨κ»˜ μ‚¬μš©ν•΄μ£Όμ–΄μ•Ό μ›Ήν‘œμ€€μ„ μ€€μˆ˜ν•˜κ²Œ λ©λ‹ˆλ‹€.
β€’ μ„Ήμ…˜ μ˜μ—­μ— μ›Ήν‘œμ€€ μ€€μˆ˜λ₯Ό μœ„ν•΄ μ„ μ–Έν•œ h2νƒœκ·Έκ°€ μ‚¬μš©μž λˆˆμ— 보이지 μ•Šλ„λ‘ λΈ”λΌμΈλ“œ 속성을 μ£ΌκΈ° μœ„ν•΄ μ„ νƒμžλ‘œ λΈ”λΌμΈλ“œλ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
β€’ 이미지 λŒ€μ²΄ ν…μŠ€νŠΈλ₯Ό λˆˆμ— μ•ˆλ³΄μ΄κ²Œ ν•˜κΈ° μœ„ν•΄ ir효과λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.
β€’ μ΄λ―Έμ§€λŠ” css둜 λ„£κΈ° λ•Œλ¬Έμ— 이미지 μ•ˆ ν…μŠ€νŠΈ λ°•μŠ€ ꡬ쑰둜 μž‘μ—…ν•©λ‹ˆλ‹€.
β€’ κ·Έ μ™Έ 이동 μ•„μ΄μ½˜κ³Ό dotλΆ€λΆ„μ˜ μ•„μ΄μ½˜μ€ 각각 ν•˜λ‚˜λ‘œ λ¬Άμ–΄μ£Όμ–΄μ„œ 이미지 | μ΄λ™μ•„μ΄μ½˜ | dot μ„Έκ°œμ˜ 큰 틀을 μž‘μ•„μ€λ‹ˆλ‹€.

<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>ANIMALS</span>
                    <h3>cUTE ANIMALS</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>

< CSS μ†ŒμŠ€ : μŠ€νƒ€μΌ μ μš©ν•˜κΈ° >

ꡬ쑰 μ§œμž„μ˜ μˆœμ„œλŒ€λ‘œ css μŠ€νƒ€μΌμ„ μ μš©μ‹œμΌœ λ΄…μ‹œλ‹€. 이 λ•Œ λ””μžμΈ μ‹œμ•ˆμ„ μ°Έκ³ ν•˜λ©΄μ„œ html와 λ²ˆκ°ˆμ•„κ°€λ©° 큰 덩어리 λΆ€ν„° μŠ€νƒ€μΌμ„ μ μš©μ‹œμΌœ λ‚˜κ°€λŠ” 것이 μ€‘μš”ν•©λ‹ˆλ‹€.
속성에 λŒ€ν•œ λ‚΄μš©μ€ μ½”λ“œμ™€ 주석을 λ³΄λ©΄μ„œ μ΄ν•΄ν•΄λ΄…μ‹œλ‹€!

TIP !
β€’ λ¨Όμ € 전체 μ΄ˆκΈ°ν™”(Reset)와 폰트 λ””ν΄νŠΈ 섀정을 ν•΄μ£ΌλŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.
β€’ 각 μ˜μ—­κ³Ό μ„Ήμ…˜μ— 반볡적으둜 λ“€μ–΄κ°€λŠ” 속성듀은 곡톡 μ†μ„±μœΌλ‘œ λ”°λ‘œ μ„€μ •ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.
β€’ μ»¨ν…Œμ΄λ„ˆ 섀정을 톡해 메인 ν™”λ©΄ 크기와 여백을 μ„€μ •ν•΄μ€€ λ’€ 메인 μ½˜ν…μΈ μΈ μ„Ήμ…˜μ—κ²Œ μŠ€νƒ€μΌμ„ μ μš©μ‹œν‚΅λ‹ˆλ‹€.
β€’ span νƒœκ·ΈλŠ” display: blockλ₯Ό λ¨Όμ € μ„€μ •ν•˜μ—¬ μž‘μ—…ν•˜λŠ” 것이 νŽΈλ¦¬ν•©λ‹ˆλ‹€.
β€’ text-underline-position: underλŠ” 크둬 λΈŒλΌμš°μ €μ—κ²Œλ§Œ μ μš©λ˜λŠ” μ†μ„±μœΌλ‘œ 언더라인과 ν…μŠ€νŠΈμ˜ 간격이 쑰금 μƒμ„±λ©λ‹ˆλ‹€.
β€’ μ΄λ―Έμ§€λŠ” background: url()을 μ΄μš©ν•˜μ—¬ 배경에 μ‚½μž…ν•©λ‹ˆλ‹€.

/* font */
@import url('https://webfontworld.github.io/NexonLv1Gothic/NexonLv1Gothic.css');

.nexon {
    font-family: 'NexonLv1Gothic';
    font-weight: 400;
}

/* reset */
* {
    margin: 0;
    padding: 0;
}
a {
    text-decoration: none;
    color: #000;
}
img {
    width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
}
em,
i,
address {
    font-style: normal;
}
li {
    list-style: none;
}
.blind{
    position: absolute;
    clip: rect(0 0 0 0);
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
}

/* common : 곡톡 μš”μ†Œ(μž¬ν™œμš©) */
.container {
    width: 1160px;
    padding: 0 20px;
    margin: 0 auto;
    min-width: 1160px;
}
.section {
    padding: 120px 0;
}
.section > h2 {
    font-size: 50px;
    line-height: 1;
    text-align: center;
    margin-bottom: 20px;
}
.section > p {
    font-size: 22px;
    font-weight: 300;
    color: #666;
    text-align: center;
    margin-bottom: 70px;
}
.gray {
    background-color: #f5f5f5;
}

/* sliderType */
.slider__inner {
    margin-top: 70px;
}
.slider {
    position: relative;
}
.slider__img {
    /* height: 500px;  밑에 μ„ΈλΆ€ μ˜μ—­ 작기 전에 λŒ€μΆ© μž‘μ•„λ†“μ€ μ˜μ—­μ΄λ―€λ‘œ μ§€μš°κΈ° */
    background: url(../img/slider_type01_01.jpg) no-repeat center / cover;
}
.slider__img .desc {
    width: 1160px;
    margin: 0 auto;
    padding: 100px 20px;
}
.slider__img .desc span {
    font-size: 16px;
    background-color: #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 {}
.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: url(../img/slider_icon.svg);
}
.slider__arrow a.left {
    left: 20px;
}
.slider__arrow a.right {
    right: 20px;
    background-position: -50px 0; /* xμΆ•μœΌλ‘œ -50px이동해야 λ‚˜μ˜¨λ‹€. */
}
.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/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;
}

πŸŽ‰ 결과보기 πŸŽ‰

728x90

λŒ“κΈ€


Lucky Charms Rainbow
js
html
css