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

[์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ] ํ—ค๋” ์œ ํ˜• 01

by ์ฝ”๋”ฉ๊ณต์ฑ… 2022. 9. 1.
๋ฐ˜์‘ํ˜•

์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ : ํ—ค๋” ์œ ํ˜• STUDY 01

์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” Figma์—์„œ ๋งŒ๋“  ํ—ค๋” ์œ ํ˜•์„ HTML๊ณผ CSS ์ฝ”๋“œ๋กœ ์˜ฎ๊ธฐ๋Š” ์ž‘์—…์„ ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.


Figma

๋จผ์ € ๋งŒ๋“ค๊ณ ์ž ํ•˜๋Š” ์›น ์‚ฌ์ดํŠธ์˜ ๋ชจ์–‘์„ Figma๋ผ๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ด์šฉํ•˜์—ฌ ์•„๋ž˜์™€ ๊ฐ™์ด ๋งŒ๋“ค์–ด์ฃผ๋„๋ก ํ•˜์ž.

HTML ์†Œ์Šค

์›น ํ‘œ์ค€ ์ค€์ˆ˜๋ฅผ ์œ„ํ•ด ์‹œ๋งจํ‹ฑ ํƒœ๊ทธ๋ฅผ ์ ๊ทน ์‚ฌ์šฉํ•˜๋„๋ก ํ•˜์ž.

<body>
    <section id="headerType" class="header__wrap nexon">
        <div class="header__inner">
            <div class="header__logo">
                <a href="#">web <em>site</em></a>
            </div>
            <div class="header__menu">
                <ul>
                    <li><a href="#">ํ—ค๋” ์˜์—ญ</a></li>
                    <li><a href="#">์Šฌ๋ผ์ด๋“œ ์˜์—ญ</a></li>
                    <li><a href="#">์ด๋ฏธ์ง€ ์˜์—ญ</a></li>
                    <li><a href="#">์ปจํ…์ธ  ์˜์—ญ</a></li>
                    <li><a href="#">ํ‘ธํ„ฐ ์˜์—ญ</a></li>
                </ul>
            </div>
            <div class="header__member">
                <a href="#">๋กœ๊ทธ์ธ</a>
            </div>
        </div>
    </section>
</body>

CSS ์†Œ์Šค

reset์—์„œ margin๊ฐ’๊ณผ padding๊ฐ’์„ 0์œผ๋กœ ์ดˆ๊ธฐํ™” ์‹œํ‚ค๋Š” ์ž‘์—…๋ถ€ํ„ฐ ์‹œ์ž‘ํ•œ๋‹ค.

<style>
    /* fonts */
    @import url('https://webfontworld.github.io/NexonLv1Gothic/NexonLv1Gothic.css');

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

    /* reset */
    * {
        margin: 0;
        padding: 0;
    }
    h1, h2, h3, h4, h5, h6 {
        font-weight: normal;
    }
    a {
        text-decoration: none;
        color: #000;
    }
    img {
        width: 100%;    /* ์ด๋ฏธ์ง€ ํŠ€์–ด๋‚˜์˜จ ๊ฑฐ ์ง‘์–ด๋„ฃ๊ธฐ */
    }
    em, i, address {
        font-style: normal;
    }

    /* common */
    .container {
        width: 1160px;
        padding: 0 20px;
        margin: 20px auto;
        min-width: 1160px;  /* ๋ฐ˜์‘ํ˜• ํ•  ๋•Œ ์—†์• ์ค„ ๊ฒƒ */
    }
    .section {
        padding: 120px 0;
    }
    .section > h2 {
        font-size: 50px;
        line-height: 1;
        text-align: center;
        margin-bottom: 70px;
    }
    .section > p {
        font-size: 16px;
        text-align: center;
        margin-bottom: 10px;
    }

    /* headerType */
    .header__inner {
        width: 100%;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        box-sizing: border-box;
        border-bottom: 1px solid #ccc;
    }
    .header__logo {
        width: 20%;
        font-size: 30px;
        font-weight: 700;
        text-transform: uppercase;
    }
    .header__logo em {
        font-size: 18px;
        font-weight: 400;
    }
    .header__menu {
        width: 60%;
        text-align: center;
    }
    .header__menu li {
        display: inline;
    }
    .header__menu li a {
        padding: 13px 30px;
        margin: 0 5px;
        transition: background-color 0.3s;
    }
    .header__menu li a:hover {
        background: #f1f1f1;
        border-radius: 5px;
    }

    .header__member {
        width: 20%;
        text-align: right;
    }
    .header__member a {
        font-size: 16px;
        border: 1px solid #000;
        padding: 10px 30px;
        border-radius: 50px;
        transition: all 0.3s ease;
    }
    .header__member a:hover {
        background: #000;
        color: #fff;
    }
</style>

์ตœ์ข… ๊ฒฐ๊ณผ

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€


Reference Book

JavaScript
HTML
CSS
๊ด‘๊ณ  ์ค€๋น„์ค‘์ž…๋‹ˆ๋‹ค.