๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
์‹œ๋„/๊ตญ๋น„์ง€์›

[D+44] Front-end ๋ฏธ๋‹ˆํ”„๋กœ์ ํŠธ 1์ผ์ฐจ : ์›นํฐํŠธ ์„ค์ • ๋ฐ ๋„ค๋น„๊ฒŒ์ดํ„ฐ ์„ค์ •

by ๐Ÿ‡๋ฐ•๋ด‰๋ด‰๐Ÿ‡ 2022. 11. 22.

 

 

๊ตญ๋น„์ง€์› D+44

Front-end ๋ฏธ๋‹ˆํ”„๋กœ์ ํŠธ 1์ผ์ฐจ

-  ์›นํฐํŠธ ์„ค์ • ๋ฐ ๋„ค๋น„๊ฒŒ์ดํ„ฐ ์„ค์ • -

 


 

๋ชฉ์ 

์Šคํฌ๋กค์„ ์›€์ง์ผ๋•Œ๋งˆ๋‹ค ๋ฐ˜์‘ํ•˜๋Š” ์Šคํฌ๋กค์ธํ„ฐ๋ ‰์…˜ ์‚ฌ์ดํŠธ๋ฅผ ๊ตฌํ˜„ํ•˜๊ธฐ

 

์˜ค๋Š˜ ํ•œ ์ผ

- ์›นํฐํŠธ ์„ค์ •

- ๋„ค๋น„๊ฒŒ์ดํ„ฐ ์„ค์ •

 

ํŒŒ์ผ ๊ตฌ์„ฑ ๋ฐ ๋‚ด์šฉ

 


• index.html

- ์›นํฐํŠธ๋ฅผ ์„ค์ •ํ•ด ์ดˆ๊ธฐ ์…‹ํŒ…์„ ์ง„ํ–‰ํ•ด์ฃผ์—ˆ๋‹ค.

- ์ƒ๋‹จ์— ๋“ค์–ด๊ฐ„ ๋ฉ”๋‰ด์— ๋Œ€ํ•œ ์ •๋ณด์™€ ๋‚ด์šฉ๋“ค์„ ๋„ฃ์€ ํ›„ nav์™€ sectionํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•ด ์˜๋ฏธ๋ฅผ ๋ถ€์—ฌํ•˜์˜€๋‹ค.

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <!-- ์™ธ๋ถ€ํŒŒ์ผ CSS -->
    <!-- ํฐํŠธ -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap" rel="stylesheet">
    <!-- ์Šคํƒ€์ผ -->
    <link rel="stylesheet" href="reset.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    
    <nav class="global-nav">
        <div class="global-nav-links">
            <a href="#" class="global-nav-link">Home</a>
            <a href="#" class="global-nav-link">History</a>
            <a href="#" class="global-nav-link">Store</a>
            <a href="#" class="global-nav-link">Contact</a>
        </div>
    </nav>

    <nav class="local-nav">
        <div class="local-nav-links">
            <a href="#" class="local-nav-link">Real Apple Pro</a>
            <a href="#" class="local-nav-link">Overview</a>
            <a href="#" class="local-nav-link">Compare</a>
            <a href="#" class="local-nav-link">Buy</a>
        </div>
    </nav>

    <section id="section-0" class="scroll-section">
        <div class="product-name">
            <h1>Real Apple Pro</h1>
        </div>
        <div class="section0-message">
            <p>์˜จ์ „ํžˆ ๋น ์ ธ๋“ค๊ฒŒ ํ•˜๋Š” ๋น›๊น”</p>
        </div>
        <div class="section0-message">
            <p>๋‚˜์˜ ๊ฑด๊ฐ•์„ ์ฑ„์›Œ์ฃผ๋Š” ํ–ฅ๊ธฐ</p>
        </div>
        <div class="section0-message">
            <p>๊นจ๋—ํ•œ ์ž์—ฐ์˜ ์‹ ์„ ํ•จ</p>
        </div>
        <div class="section0-message">
            <p>์ƒˆ๋กญ๊ฒŒ ์ž…๊ฐ€๋ฅผ ์ฐพ์•„์˜จ ๋งคํ˜น</p>
        </div>
    </section>

    <section id="section-1" class="scroll-section">
        <div class="section1-message">
            <p>
                <strong>์ง„์งœ ์‚ฌ๊ณผ ์ด์•ผ๊ธฐ</strong>
                ์‚ฌ๊ณผ๋ฅผ ๋งค์ผ ํ•˜๋‚˜์”ฉ ๋จน์œผ๋ฉด ์˜์‚ฌ ๋ณผ ์ผ์ด ์—†๋‹ค
                (an apple a day keeps the doctor away)๋ž€ ์†๋‹ด์ด ์žˆ์„ ์ •๋„๋กœ 
                ์œ ๋ช…ํ•œ ๊ฐ€์„ ๊ณผ์ผ ์ค‘ ํ•˜๋‚˜๋‹ค. ๋น„์Šทํ•œ ์†๋‹ด์ด ํ† ๋งˆํ† ์—๋„ ์žˆ๋‹ค. 
                ๊ทธ๋งŒํผ ๋น„ํƒ€๋ฏผC์™€ ๋ฌด๊ธฐ์งˆ์ด ๋งŽ์•„ ๊ฐ„์‹ ๋Œ€์šฉ์œผ๋กœ ์‚ฌ๊ณผ๋ฅผ ํ•œ ์•Œ ๋จน๋Š”๋‹ค๋ฉด 
                ๋น„ํƒ€๋ฏผC ๋ถ€์กฑ์— ์‹œ๋‹ฌ๋ฆด ์ผ์€ ์—†๋‹ค. ๋‹ค๋งŒ ๊ณผ๋‹น์ด ๋งŽ์•„์„œ ํ†ต์ƒ์ ์ธ ์ด๋ฏธ์ง€์™€๋Š” 
                ๋‹ฌ๋ฆฌ ๋‹ค์ด์–ดํŠธ ์‹ํ’ˆ์œผ๋กœ์„œ๋Š” ๊ทธ๋‹ค์ง€ ํšจ๋Šฅ์ด ์ข‹์ง€ ์•Š์€๋ฐ, ๋‹จ์œ„ ์ค‘๋Ÿ‰ ๋‹น ์—ด๋Ÿ‰์€ 
                ์•„๋ณด์นด๋„๋‚˜ ๋ฐ”๋‚˜๋‚˜ ๋“ฑ๊ณผ ํ•จ๊ป˜ ์ œ๋ฒ• ๋†’์€ ํŽธ์— ์†ํ•œ๋‹ค. 
                ๋‹น์—ฐํžˆ ์‚ฌ๊ณผ์˜ ํฌ๊ธฐ์™€ ์˜์–‘์ƒํƒœ์— ๋”ฐ๋ผ ๋‹ค๋ฅด์ง€๋งŒ 300g ์ •๋„ ๋‚˜๊ฐ€๋Š” ํ•œ ์•Œ์ด 
                200kcal๋Š” ๋„˜์„ ์ˆ˜ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋ฉด ๋œ๋‹ค.
                ๋น„ํƒ€๋ฏผ C๊ฐ€ ํ’๋ถ€ํ•œ ๋งŒํผ ๊ฐ๊ธฐ ์˜ˆ๋ฐฉ์— ํšจ๊ณผ์ ์ด๋‚˜, ํ•œ์˜ํ•™์ ์œผ๋กœ ์‚ฌ๊ณผ๋Š”
                ์ฐจ๊ฐ€์šด ์„ฑ์งˆ์„ ๊ฐ€์ง€๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ชฉ๊ฐ๊ธฐ๋‚˜ ๊ธฐ์นจ์— ์ข‹์ง€ ์•Š๋‹ค๊ณ  ํ•œ๋‹ค. 
                ๊ฐ๊ธฐ์— ์ข‹๋‹ค๊ณ  ํ•˜๋Š” ๊ณผ์ผ์€ ๋ฐฐ, ๊ทธ๋ฆฌ๊ณ  ๊ทค๋„ ์ข‹๋‹ค๊ณ  ํ•œ๋‹ค. 
                ๋ฐฐ๋Š” ๊ณผ์ผ ์ค‘์—์„œ๋„ ํŠนํžˆ ์ˆ˜๋ถ„, ๋ฌด๊ธฐ์งˆ์ด ๋งŽ์€ ๊ณผ์ผ ์ค‘ ํ•˜๋‚˜์ด๊ธฐ ๋•Œ๋ฌธ์— 
                ๊ฐ๊ธฐ์— ๊ฑธ๋ ธ์„ ๋•Œ ์ˆ˜๋ถ„ ๋ณด์ถฉ์— ์•„์ฃผ ์ ์ ˆํ•œ ์‹ํ’ˆ์ด๋‹ค.
            </p>
        </div>
    </section>

    <footer>
        <div>
            <p>Copyleft 2022 PARK SUHYEON Allright reserved.</p>
        </div>
    </footer>

    <!-- ์™ธ๋ถ€ํŒŒ์ผ JS -->
    <script src="main.js"></script>
</body>
</html>

 

• reset.css

- html์—์„œ ๊ธฐ๋ณธ default๋กœ ์„ค์ •๋˜์–ด ์žˆ๋Š” ๊ฐ’์„ ๋ชจ๋‘ ์ดˆ๊ธฐํ™”ํ•ด์ฃผ๊ธฐ ์œ„ํ•ด reset.css ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•ด ์ฃผ์—ˆ๋‹ค.

- index.html์—์„œ ๋งํฌํ• ๋•Œ ์บ์Šค์ผ€์ด๋”ฉ์— ์›๋ฆฌ์— ๋”ฐ๋ผ ์›นํฐํŠธ ๋‹ค์Œ์— ๋„ฃ์–ด์ฃผ์—ˆ๋‹ค.

@charset 'utf-8';

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
	 display: block; 
}

div, span, article, section, header, footer, aside, p, ul, li, fieldset, legend, label, a, nav, form {
	box-sizing: border-box;
}

 

• style.css

- ์›น์‚ฌ์ดํŠธ์˜ ๊ธฐ๋ณธ ์…‹ํŒ… ๋ฐ ๋„ค๋น„๊ฒŒ์ดํ„ฐ์˜ ๋งํฌ์˜ ๋ฐ‘์ค„์„ ์ œ๊ฑฐํ•ด์ฃผ์—ˆ๋‹ค.

@charset 'utf-8';

html {
    /*
    ์›นํฐํŠธ
        ์žฅ์  : ์–ด๋Šํ™˜๊ฒฝ์—์„œ๋“  ์ ์šฉ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.
        ๋‹จ์  : ์šฉ๋Ÿ‰์ด ํด ๊ฒฝ์šฐ ์†๋„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธธ ์ˆ˜ ์žˆ๋‹ค.
        1. ๊ตฌ๊ธ€ ํฐํŠธ์—์„œ Noto Sans ๊ฒ€์ƒ‰
        2. ์ ๋‹นํ•œ ํฐํŠธ ์„ ํƒ (R400, B700)
        3. ํฐํŠธ๋ฅผ html์—์„œ linkํƒœ๊ทธ๋ฅผ ํ†ตํ•ด ํฌํ•จ์‹œํ‚ด
        4. ํฌํ•จ๋œ ํฐํŠธ๋ฅผ CSS์˜ html ํƒœ๊ทธ์—์„œ ์„ค์ •
    */
    font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    /* ์ˆ˜ํ‰ ์Šคํฌ๋กค ์ œ๊ฑฐ */
    overflow-x: hidden;
    /* ๊ธ€๊ฐ„๊ฒฉ(์ž๊ฐ„)์„ 5% ์ขํžŒ๋‹ค */
    letter-spacing: -0.05em;
}

a {
    /* underline ์ œ๊ฑฐ */
    text-decoration: none;
}

 


๊ฒฐ๊ณผํ™”๋ฉด

 

 

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€