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

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

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

TextType01

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


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

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

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


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

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

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

<section id="textType01" class="section gmak container">
    <p>ํ…์ŠคํŠธ ์œ ํ˜•01</p>
    <h2>๋”ฉ๋™๋Œ• ์•ผ์˜น์œ ์น˜์›</h2>
    <main class="main">
        <article class="text__box">
            <div class="icon__box icon1"></div>
            <div class="text__desc">
                <h2 class="desc__header">์•ผ์˜น์œ ์น˜์›2๊ธฐ</h2>
                <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</p>   
                <a href="#" class="more">๋”๋ณด๊ธฐ</a> 
            </div>
        </article>
        <article class="text__box">
            <div class="icon__box icon2"></div>
            <div class="text__desc">
                <h2 class="desc__header">์•ผ์˜น์œ ์น˜์›2๊ธฐ</h2>
                <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</p>
                <a href="#" class="more">๋”๋ณด๊ธฐ</a>    
            </div>
        </article>
        <article class="text__box">
            <div class="icon__box icon3"></div>
            <div class="text__desc">
                <h2 class="desc__header">์•ผ์˜น์œ ์น˜์›2๊ธฐ</h2>
                <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</p>
                <a href="#" class="more">๋”๋ณด๊ธฐ</a>    
            </div>
        </article>
        <article class="text__box">
            <div class="icon__box icon4"></div>
            <div class="text__desc">
                <h2 class="desc__header">์•ผ์˜น์œ ์น˜์›2๊ธฐ</h2>
                <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</p>
                <a href="#" class="more">๋”๋ณด๊ธฐ</a>    
            </div>
        </article>
        <article class="text__box">
            <div class="icon__box icon5"></div>
            <div class="text__desc">
                <h2 class="desc__header">์•ผ์˜น์œ ์น˜์›2๊ธฐ</h2>
                <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</p>
                <a href="#" class="more">๋”๋ณด๊ธฐ</a>    
            </div>
        </article>
        <article class="text__box">
            <div class="icon__box icon6"></div>
            <div class="text__desc">
                <h2 class="desc__header">์•ผ์˜น์œ ์น˜์›2๊ธฐ</h2>
                <p class="desc">์•ผ์˜น ์œ ์น˜์› 2๊ธฐ ๊น€๋ƒฅ๋ƒฅ ์ž…๋‹ˆ๋‹ค. ๋ƒฅ๋ƒฅ์ด๋Š” ๋˜‘๋˜‘ํ•˜๊ณ  ์•„์ฃผ ๊ท€์—ฝ์Šต๋‹ˆ๋‹ค. ์•ผ์˜น ๋ฐ˜์žฅ์œผ๋กœ์„œ ์ตœ์„ ์„ ๋‹คํ•˜๋Š” ๋ชจ๋ฒ”์ ์ธ ํ•™์ƒ์ž…๋‹ˆ๋‹ค.</p>
                <a href="#" class="more">๋”๋ณด๊ธฐ</a>    
            </div>
        </article>
    </main>
</section>

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

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

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

/* font */
.gmak {
    font-family: 'GmarketSans';
    font-size: 18px;
    font-weight: 300;
}

/* reset */
* {
    padding: 0;
    margin: 0;
}

a {
    text-decoration: underline;
    color: #000;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
}
img {
    width: 100%;
    vertical-align: top;
}

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

.section > h2 {
    font-size: 50px;
    margin-bottom: 70px;
    text-align: center;
}

.section > p {
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 10px;
    text-align: center; 
    color: #666;
}

/* main */
.main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.text__box {
    padding: 20px;
    margin-bottom: 20px;
    width: 29%;
    transition: all 0.2s;
}
.text__box:hover {
    background: #f5f5f5;
    border-radius: 10px;
}
.desc__header {
    font-size: 24px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.desc__header ~ .desc {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}
.desc__header ~ .more {
    color: #666;
}
.icon__box {
    margin-bottom: 10px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: url(img/text_icons01.svg);
}
.icon__box.icon2 {background-position: -60px 0;}
.icon__box.icon3 {background-position: -120px 0;}
.icon__box.icon4 {background-position: -180px 0;}
.icon__box.icon5 {background-position: -240px 0;}
.icon__box.icon6 {background-position: -300px 0;}

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

728x90

๋Œ“๊ธ€


Lucky Charms Rainbow
js
html
css