๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
SITE

[SITE] ์ด๋ฏธ์ง€ ์œ ํ˜• ๋งŒ๋“ค๊ธฐ 02

by _ํ† ๋งคํ†  2022. 8. 18.
728x90

Image Type02

์ด๋ฒˆ ์ด๋ฏธ์ง€ ์œ ํ˜•์—์„œ๋Š” ์• ๋‹ˆ๋ฉ”์ด์…˜๊ณผ ๋ธ”๋Ÿฌ ํšจ๊ณผ๋ฅผ ์ฃผ์–ด์„œ ๋” ๋™์ ์ธ ํŽ˜์ด์ง€๋ฅผ ์‹ค์Šตํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค!


< figma : ๋””์ž์ธ ํ•˜๊ธฐ >

์ด๋ฏธ์ง€ ์œ ํ˜•์˜ ๊ฐ€์žฅ ๊ธฐ์ดˆ์ ์ธ ๋ ˆ์ด์•„์›ƒ์œผ๋กœ ์ด๋ฏธ์ง€ ๋ฐ•์Šค ์•ˆ์— ํ…์ŠคํŠธ์™€ ๋งํฌ ๋ฐ•์Šค๊ฐ€ ๋“ค์–ด๊ฐ€ ์žˆ๋Š” ๊ตฌ์กฐ์ž…๋‹ˆ๋‹ค.

TIP ! ์—ฌ๋ฐฑ์€ 10๋‹จ์œ„๋กœ ํ•ด์ฃผ์–ด์„œ ์ข€ ๋” ํšจ์œจ์ ์œผ๋กœ ์ž‘์—…ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค:)

๐ŸŽจ ๊ทธ๋ฆฌ๋“œ์™€ ๋ ˆ์ด์•„์›ƒ

๐ŸŽจ ์™„์„ฑ๋ณธ


< HTML ์†Œ์Šค : ๋ ˆ์•„์•„์›ƒ ๊ตฌ์กฐ ํŒŒ์•…ํ•˜๊ธฐ >

๋””์ž์ธํ•œ ์›น ํŽ˜์ด์ง€ ์‹œ์•ˆ์„ ๋ณด๋ฉฐ ํŽ˜์ด์ง€ ๊ตฌ์กฐ๋ฅผ ํŒŒ์•…ํ•œ ํ›„ ์›น ํ‘œ์ค€์„ฑ๊ณผ ์ ‘๊ทผ์„ฑ์— ๋งž๋Š”์‹œ๋ฉ˜ํ‹ฑํ•œ ๋งˆํฌ์—…์„ ํ•ด์ค๋‹ˆ๋‹ค.

! TIP ! ์ด๋ฒˆ ์œ ํ˜•์€ ๋ฐฑ๊ทธ๋ผ์šด๋“œ์— ์ด๋ฏธ์ง€๋ฅผ ์‚ฝ์ž…ํ•˜๋ฉด ๋”ฐ๋กœ ์• ๋‹ˆ๋ฉ”์ด์…˜๊ณผ ๊ฐ™์€ ํšจ๊ณผ๋ฅผ ์ฃผ๊ธฐ ์–ด๋ ต๊ธฐ ๋•Œ๋ฌธ์— imgํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€๋ฅผ ์‚ฝ์ž…ํ•˜์—ฌ ์ž‘์—…ํ•ฉ๋‹ˆ๋‹ค:)
์ง€๋‚œ ์‹œ๊ฐ„์— ์ž‘์—…ํ•œ ์ด๋ฏธ์ง€ ์œ ํ˜•01์—์„œ ๊ณตํ†ต ์†์„ฑ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ์„น์…˜์— ์„น์…˜ ์„ ํƒ์ž๋ฅผ ๋ถ™์—ฌ์ค๋‹ˆ๋‹ค.

<section id="imageType01" class="image__wrap Nexon section">
    <h2>๋”ฉ๋™๋Œ• ๋ฉ๋ฉ์œ ์น˜์›</h2>
    <p>๐Ÿพ๐Ÿถ ๊ฐ•์•„์ง€๋ฅผ ์ข‹์•„ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ๋ฉ๋ฉ ๋ฆฌ์ŠคํŠธ ์ž…๋‹ˆ๋‹ค. ๐Ÿถ๐Ÿพ</p>
    <div class="image__inner container">
        <article class="image img1">
            <figure class="image__box">
                <img src="img/img_bg02_01.jpg" alt="dog">
            </figure>
            <div class="image__desc">
                <h3 class="image__title">์• ๋‹ˆ๋ฉ€ 2๊ธฐ ์ด๋Œ•๋Œ•</h3>
                <a href="#" title="์ž์„ธํžˆ ๋ณด๊ธฐ" class="more">์ž์„ธํžˆ ๋ณด๊ธฐ</a>
            </div>
        </article>
        <article class="image img2">
            <figure class="image__box">
                <img src="img/img_bg02_02.jpg" alt="dog">
            </figure>
            <div class="image__desc">
                <h3 class="image__title">์• ๋‹ˆ๋ฉ€ 2๊ธฐ ์˜ค๋Œ•๋Œ•</h3>
                <a href="#" title="์ž์„ธํžˆ ๋ณด๊ธฐ" class="more">์ž์„ธํžˆ ๋ณด๊ธฐ</a>
            </div>
        </article>
        <article class="image img3">
            <figure class="image__box">
                <img src="img/img_bg02_03.jpg" alt="dog">
            </figure>
            <div class="image__desc">
                <h3 class="image__title">์• ๋‹ˆ๋ฉ€ 2๊ธฐ ๊น€๋Œ•๋Œ•</h3>
                <a href="#" title="์ž์„ธํžˆ ๋ณด๊ธฐ" class="more">์ž์„ธํžˆ ๋ณด๊ธฐ</a>
            </div>
        </article>
    </div>
</section>
! html ์ฃผ์˜์‚ฌํ•ญ !
โ€ข imgํƒœ๊ทธ์˜ ์†์„ฑ ์ค‘ alt์•ˆ์— ์ด๋ฏธ์ง€์— ๋Œ€ํ•œ ์„ค๋ช…์„ ๋„ฃ์–ด์ค˜์•ผ ์‹œ๊ฐ ๋ฐ ์ฒญ๊ฐ ์žฅ์• ์ธ๋“ค๋„ ์Šคํฌ๋ฆฐ๋ฆฌ๋”๊ธฐ๋ฅผ ํ†ตํ•ด ์ดํ•ด ๊ฐ€๋Šฅ
โ€ข ์„น์…˜๊ณผ ์•„ํ‹ฐํด ํƒœ๊ทธ์—๋Š” ๊ผญ ์ œ๋ชฉ ํƒœ๊ทธ๋ฅผ ์ž์‹ ์š”์†Œ๋กœ ๋„ฃ์–ด ์ฃผ์–ด์„œ ์›นํ‘œ์ค€๊ณผ ์›น ์ ‘๊ทผ์„ฑ, ํ˜ธํ™˜์„ฑ์„ ๋†“์น˜์ง€ ์•Š๋„๋ก ํ•˜์ž!
โ€ข a ํƒœ๊ทธ์—๊ฒŒ title ์†์„ฑ์„ ๋ถ€์—ฌํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.
โ€ข imgํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ๋Š” ๊ผญ figure ํƒœ๊ทธ๋ฅผ ์„ ์–ธํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.

< CSS ์†Œ์Šค : ์Šคํƒ€์ผ ์ ์šฉํ•˜๊ธฐ >

์†์„ฑ์„ ์ง€์ •ํ•  ๋•Œ๋Š” ๋””์ž์ธ ์‹œ์•ˆ์„ ์ฐธ๊ณ ํ•˜๋ฉด์„œ html์™€ ๋ฒˆ๊ฐˆ์•„๊ฐ€๋ฉฐ ํฐ ๋ฉ์–ด๋ฆฌ ๋ถ€ํ„ฐ ์Šคํƒ€์ผ์„ ์ ์šฉ์‹œ์ผœ ๋‚˜๊ฐ€๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.
transition, transform, backdrop-filter๋ฅผ ํ†ตํ•ด ๋™์ ์ธ ์Šคํƒ€์ผ ์†์„ฑ์„ ์ฃผ๋„๋ก ํ•ฉ์‹œ๋‹ค!
์†์„ฑ์— ๋Œ€ํ•œ ๋‚ด์šฉ์€ ์ฝ”๋“œ์™€ ์ฃผ์„์„ ์ฐธ๊ณ ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค:)

TIP !
1. ๋จผ์ € ์ „์ฒด ์ดˆ๊ธฐํ™”(Reset)์™€ ํฐํŠธ ๋””ํดํŠธ ์„ค์ •์„ ํ•ด์ฃผ๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.
2. ์ปจํ…Œ์ด๋„ˆ ์„ค์ •์„ ํ†ตํ•ด ์‚ฌ์ดํŠธ์˜ ํฌ๊ธฐ์™€ ์—ฌ๋ฐฑ์„ ์„ค์ •ํ•ด์ค€ ๋’ค ๋ฉ”์ธ ์ฝ˜ํ…์ธ ์ธ ์„น์…˜์—๊ฒŒ ์Šคํƒ€์ผ์„ ์ ์šฉ์‹œํ‚จ๋‹ค. : ์ด๋ ‡๊ฒŒ ์ปจํ…Œ์ด๋„ˆ๋กœ ์ž‘์—…ํ•˜๊ฒŒ ๋˜๋ฉด ๋” ํšจ์œจ์ ์œผ๋กœ ์†์„ฑ์„ ์ ์šฉ์‹œํ‚ฌ ์ˆ˜ ์žˆ๊ฒŒ ๋œ๋‹ค.
3. :hover ์†์„ฑ์„ ํ†ตํ•ด ์ปค์„œ๊ฐ€ ํ•ด๋‹น ์š”์†Œ์— ๋‹ฟ์•˜์„ ๋•Œ์˜ ๋™์  ํšจ๊ณผ๋ฅผ ์ฃผ๋„๋ก ํ•œ๋‹ค.

/@import url('https://webfontworld.github.io/gmarket/GmarketSans.css');

/* font */
.gmark {
    font-family: 'GmarketSans';
    font-weight: 300;
}

/* reset */
* {
    margin: 0;
    padding: 0;
}
a {
    text-decoration: none;
    color: #000;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
}

/* common : ๊ณตํ†ต ์š”์†Œ(์žฌํ™œ์šฉ) */
.container {
    width: 1160px;
    padding: 0 20px;
    margin: 0 auto;
}
.section {
    padding: 120px 0;
}
.section>h2 {
    font-size: 50px;
    margin-bottom: 20px;
    text-align: center;
}
.section>p {
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 70px;
    text-align: center;
    color: #666;
}

/* imageType */
.image__inner {
    display: flex;
    justify-content: space-between;
}
.image {
    width: 32%;
    position: relative;
    overflow: hidden;   /* ์˜์—ญ ๋ฐ– ์š”์†Œ ์ˆจ๊ธฐ๊ธฐ */
}
.image__box img {
    vertical-align: top; /* ์ˆ˜์ง ์ •๋ ฌ */
    height: 100%;
}
.image__desc {
    box-sizing: border-box;
    width: 100%;
    height: 100px;
    text-align: center;
    position: absolute;
    left: 0;
    bottom: 0;
    backdrop-filter: blur(10px);    /* ๋ธ”๋Ÿฌ ํšจ๊ณผ */
    padding: 23px 20px;
    bottom: -100px;
    transition: all 0.3s ease-in-out;    /* ์›€์ง์ž„ ์†๋„ ํšจ๊ณผ : ์ „์ฒด๋ฅผ 0.3์ดˆ ๋™์•ˆ ์ฒœ์ฒœ-๋ณดํ†ต-์ฒœ์ฒœ ์ˆœ์œผ๋กœ ์›€์ง์ด๊ฒŒ ํ•˜๊ธฐ */
}
.image:hover .image__desc {      /* ์ปค์„œ๋ฅผ ๊ฐ–๋‹ค ๋Œ€์—ˆ์„ ๋•Œ desc๊ฐ€ ์œ„๋กœ ์˜ฌ๋ผ์˜ค๋„๋ก ์„ค์ • : ์š”์†Œ ์•ˆ์— ๋“ค์–ด์˜ค๊ธฐ ๋•Œ๋ฌธ์— ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ ํžˆ๋“  ์†์„ฑ์„ ๋ฐ›์ง€ ์•Š์Œ*/
    bottom: 0;     
}
.image:hover .image__box img {
    transition: all 0.6s ease-in-out;    /* ์›€์ง์ž„ ์†๋„ ์„ค์ • */
    transform: scale(1.05);      /* ์ด๋ฏธ์ง€๋ฅผ ํ™•๋Œ€ ์‹œํ‚ค๊ธฐ */
}
.image__desc .image__title {
    font-size: 24px;
    margin-bottom: 5px;
}

/* desc ์ƒ‰์ƒ */
.img1 .image__desc {
    background: rgba(255, 171, 3, 0.25);
}
.img2 .image__desc {
    background: rgba(205, 94, 36, 0.1);
}
.img3 .image__desc {
    background: rgba(198, 140, 153, 0.1);
}
.img1 .image__desc .image__title {
    color: rgba(60, 32, 0);
}
.img2 .image__desc .image__title {
    color: rgba(96, 33, 6);
}
.img3 .image__desc .image__title {
    color: rgba(111, 33, 66);
}
.img1 .image__desc .more {
    color: rgba(60, 32, 0);
}
.img2 .image__desc .more {
    color: rgba(96, 33, 6);
}
.img3 .image__desc .more {
    color: rgba(111, 33, 66);
}


.image__desc .more {
    font-size: 16px;
}
.image__desc .more:hover {   /* ์ปค์„œ๊ฐ€ ๋‹ฟ์œผ๋ฉด ๋ฐ‘์ค„ ์ƒ๊ธฐ๊ฒŒ ํ•˜๊ธฐ */
    text-decoration: underline; 
}

! Css ์†์„ฑ ์•Œ์•„๊ฐ€๊ธฐ !
transition : ์›€์ง์ž„ ์†๋„ ์„ค์ •
transform : ์š”์†Œ์˜ ๋ชจ์–‘, ํฌ๊ธฐ, ์œ„์น˜ ๋“ฑ์„ ์ž์œ ๋กญ๊ฒŒ ๋ณ€๊ฒฝ
backdrop-filter : ๋ฐฐ๊ฒฝ์— ๊ทธ๋ž˜ํ”ฝ ํšจ๊ณผ๋ฅผ ์„ค์ • (๋ฐฐ๊ฒฝ์— ํˆฌ๋ช…๋„๊ฐ€ ์žˆ์–ด์•ผ ํšจ๊ณผ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.)


๊ฒฐ๊ณผ๋ณด๊ธฐ

728x90

๋Œ“๊ธ€


Lucky Charms Rainbow
js
html
css