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

[SITE] ์›น์‚ฌ์ดํŠธ - ํ…์ŠคํŠธ์œ ํ˜•02

by _ํ† ๋งคํ†  2022. 9. 1.
728x90

TextType02

์›นํŽ˜์ด์ง€ ์‹ค์Šต์„ ์œ„ํ•œ ํ…์ŠคํŠธ ์œ ํ˜•์„ ์‹ค์Šตํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค! ์ด๋ฒˆ ์œ ํ˜•์€ ๋ณดํ†ต ํ…์ŠคํŠธ๋กœ๋งŒ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•˜๊ณ ์ž ํ•  ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
๊ทธ๋Ÿผ ์•„๋ž˜์˜ ์ฝ”๋“œ๋ฅผ ๋ณด๋ฉฐ ํ•จ๊ป˜ ์‹ค์Šต ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค ๐Ÿ˜†


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

์ด๋ฒˆ ์œ ํ˜•์€ ์ด๋ฏธ์ง€๊ฐ€ ๋“ค์–ด๊ฐ€์ง€ ์•Š๊ณ  ๋Œ€์‹  ์•„์ด์ฝ˜์ด ๋“ค์–ด๊ฐ€๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ํ…์Šค๋ฅด๋กœ๋งŒ ์ด๋ฃจ์–ด์ง„ ๋งŒํผ ๋” ์‹ ๊ฒฝ์จ์„œ ์ž‘์—…ํ•ด์ค๋‹ˆ๋‹ค!

์ง€๋‚œ ํ…์ŠคํŠธ ์œ ํ˜•01๊ณผ ๋˜‘๊ฐ™์ด ์ด๋ฏธ์ง€์Šคํ”„๋ผ์ดํŠธ ๊ธฐ๋Šฅ์„ ์œ„ํ•˜์—ฌ ํ”„๋ ˆ์ž„์„ ํ•˜๋‚˜ ๋” ๋งŒ๋“ค์–ด ์•„์ด์ฝ˜์„ 60px์”ฉ ๋ฐฐ์น˜์‹œ์ผฐ์Šต๋‹ˆ๋‹ค ๐Ÿ˜‡


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

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

! TIP !
โ€ข ๊ตฌ์กฐ๋ฅผ ๋จผ์ € ๊ผผ๊ผผํ•˜๊ฒŒ ํŒŒ์•…ํ•˜์—ฌ ํฐ ๋ฉ์–ด๋ฆฌ๋ถ€ํ„ฐ ๋งˆํฌ์—…์„ ํ•˜๋Š” ๊ฒƒ์ด ๊ฐ€์žฅ ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.
โ€ข ์›นํ‘œ์ค€๊ณผ ์›น ์ ‘๊ทผ์„ฑ, ํ˜ธํ™˜์„ฑ์„ ๋†“์น˜์ง€ ์•Š๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
โ€ข ๊ณตํ†ต ์„ ํƒ์ž์™€ ๊ฐ๊ฐ์˜ ์„ ํƒ์ž๋ฅผ ํ•„์š”ํ•œ ๊ณณ์— ์ž˜ ๊ตฌ๋ณ„ํ•˜์—ฌ ๋„ฃ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.


    <section id="textType02" class="section gmak container">
    <div id="header">
        <div class="CAT">CUTECAT</div>
        <h2>๋”ฉ๋™๋Œ•<br> ์•ผ์˜น์œ ์น˜์› !</h2>
        <p>๊ณ ์–‘์ด๋ฅผ ์ข‹์•„ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ<br>๋ฆฌ์ŠคํŠธ ์ž…๋‹ˆ๋‹ค. ๐Ÿฑ๐Ÿพ <br> ์—ฌ๋Ÿฌ๋ถ„๋“ค๋„ ํ•จ๊ป˜ ๊ตฌ๊ฒฝํ•ด๋ณด์„ธ์š”!</p>
    </div>
    <div class="text__inner">
        <div class="text_top">
            <article class="text__box">
                <span class="icons icon1 ir">button</span>
                <div class="text_desc">
                    <h2 class="desc__header">์•ผ์˜น์œ ์น˜์›</h2>
                    <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</h2>
                </div>
            </article>
            <article class="text__box">
                <span class="icons icon2 ir">button</span>
                <div class="text_desc">
                    <h2 class="desc__header">๊ณต์ง€์‚ฌํ•ญ</h2>
                    <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</h2>
                </div>
            </article>
        </div>
        <div class="text_bottom">
            <article class="text__box">
                <span class="icons icon3 ir">button</span>
                <div class="text_desc">
                    <h2 class="desc__header">์นญ์ฐฌํ•ด์š”</h2>
                    <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</h2>
                </div>
            </article>
            <article class="text__box">
                <span class="icons icon4 ir">button</span>
                <div class="text_desc">
                    <h2 class="desc__header">์„œ์šดํ•ด์š”</h2>
                    <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</h2>
                </div>
            </article>
        </div>
    </div>
</section>f

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

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

! TIP !
1. display: flex๋ฅผ ์ค„ ๋•Œ ๊ตฌ์กฐ๋ฅผ ์ž˜ ํŒŒ์•…ํ•˜์—ฌ ๋‚˜๋ˆ„์–ด์ฃผ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
2. ๋จผ์ € ํ—ค๋”๋ถ€๋ถ„๊ณผ ์ปจํ…์ธ  ๋ถ€๋ถ„์„ ๋‚˜๋ˆ„์–ด ์ฃผ์–ด flex๋ฅผ ์ค๋‹ˆ๋‹ค.
3. ๊ทธ ๋’ค ์ปจํ…์ธ  ๋ถ€๋ถ„์—์„œ ์œ— ์„น์…˜๊ณผ ์•„๋ž˜ ์„น์…˜์„ ๋‚˜๋ˆ„์–ด์„œ ๊ฐ ์„น์…˜๋งˆ๋‹ค flex๋ฅผ ์ค๋‹ˆ๋‹ค.
4. ์ด๋ฏธ์ง€ ์ŠคํŠธ๋ผ์ดํ”„๋ฅผ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ ๊ณตํ†ต ์„ ํƒ์ž์™€ ๊ฐ๊ฐ์˜ ์„ ํƒ์ž๋ฅผ ๋ถ€์—ฌํ•ฉ๋‹ˆ๋‹ค.
5. ๊ทธ ๋’ค ๊ณตํ†ต ์„ ํƒ์ž์—๊ฒŒ๋Š” url()์†์„ฑ, ๊ฐ๊ฐ ์„ ํƒ์ž์—๊ฒŒ๋Š” background-position ์†์„ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ ์œ„์น˜๋ฅผ ์กฐ์ •ํ•ด์ค๋‹ˆ๋‹ค.

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

.nexon {
    font-family: 'NexonLv1Gothic';
    font-size: 18px;
    font-weight: 300;
}

/* reset */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
}

/* common : ๊ณตํ†ต ์š”์†Œ(์žฌํ™œ์šฉ) */
.container {
    width: 1160px;
    padding: 0 20px;
    margin: 0 auto;
    min-width: 1160px;
}
.section {
    padding: 120px 0;
    display: flex;
    justify-content: space-between ;
}

#header > h2 {
    font-size: 50px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: left;
}

#header > p {
    font-size: 18px;
    font-weight: 400;
    text-align: left;
}

#header > .CAT {
    width: 145px;
    height: 25px;
    font-size: 16px;
    background: #d0004b;
    padding: 4px 30px;
    border-radius: 50px;
    color: #fff;
    margin-bottom: 15px;
    text-align: center;
}
.ir {
    display: block;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
    text-indent: -9999px;
}

/* text__inner */
/* text_top๊ณผ bottom์œผ๋กœ ์„น์…˜์„ ๋‚˜๋ˆ ์คฌ์œผ๋‹ˆ ๊ทธ ์•ˆ์—์„œ ํ”Œ๋ ‰์Šค๋ฅผ ์ฃผ์–ด์•ผ 2๊ฐœ์˜ text__box๊ฐ€ ๊ฐ€๋กœ๋กœ ๋‚˜๋ž€ํžˆ ์ •๋ ฌ๋œ๋‹ค. */
.text_top {
    margin-bottom: 50px;
    display: flex;
}
.text_bottom {
    display: flex;
}
.text__box{
    width: 373px;
    padding: 20px;
}
.text__box:hover {
    background: #f5f5f5;
    border-radius: 10px;
}
.text_desc .desc__header {
    font-size: 24px;
    margin-bottom: 20px;
}
.text_desc .desc {
    font-weight: 300;
    line-height: 1.4;
} 
.icons {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    background: #000;
    background: url(img/text_icons02.svg); /* ์ด๋ฏธ์ง€ ์Šคํ”„๋ผ์ดํŠธ */
}
.icons.icon2 {background-position: -60px;}  /* ์•„์ด์ฝ˜ ๊ฐ„๊ฒฉ์ด 60px์ด๋ฏ€๋กœ ๊ฐ„๊ฒฉ์— ๋งž์ถฐ ํฌ์ง€์…˜์œผ๋กœ ์œ„์น˜ ์กฐ์ • */
.icons.icon3 {background-position: -120px;}
.icons.icon4 {background-position: -180px;}

๐ŸŽ‰ ๊ฒฐ๊ณผ๋ณด๊ธฐ ๐ŸŽ‰

728x90

๋Œ“๊ธ€


Lucky Charms Rainbow
js
html
css