๐Ÿ‘จโ€๐Ÿ’ป HTML CSS ๋ฐ JS๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์‘๋‹ต ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ๋งŒ๋“ค๊ธฐ๐Ÿ”ฅ

96807 ๋‹จ์–ด webdevcssjavascripthtml

๐Ÿ‘‹ ์•ˆ๋…•ํ•˜์„ธ์š”, ์‚ฌ๋ž‘ํ•˜๋Š” ๊ฐœ๋ฐœ์ž ์—ฌ๋Ÿฌ๋ถ„.๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป, ์˜ค๋Š˜ ์šฐ๋ฆฌ๋Š” HTML, CSS, JS, ๊ทธ๋ฆฌ๊ณ  GreenSock ์• ๋‹ˆ๋ฉ”์ด์…˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ ๋‹ค๋ฅธ ์‘๋‹ต ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€๋ฅผ ์‰ฝ๊ฒŒ ๋งŒ๋“ค์–ด์„œ ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
HTML๊ณผ CSS๋กœ ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€๋ฅผ ๋งŒ๋“œ๋Š” ๊ฒƒ์€ ๋งค์šฐ ๊ฐ„๋‹จํ•œ ์ž‘์—…์ด์ง€๋งŒ, ๋ฌด์—‡์ด ์šฐ๋ฆฌ์˜ ๋Œ“๊ธ€์„ ๋”์šฑ ์žฌ๋ฏธ์žˆ๊ฒŒ ํ•˜๋Š”์ง€ ์•„์‹ญ๋‹ˆ๊นŒ!๋„ค, ์ œ๊ฐ€ ํ† ๋ก ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌ๋‚˜ ๊ทธ ์ „์— ์ฝ”๋“œ ํŠœํ† ๋ฆฌ์–ผ์˜ ์‹œ๋ฒ”์„ ์‚ดํŽด๋ณด์ž.๋„ˆ๋Š” ์•„๋ž˜์˜ ๋™์˜์ƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

์ฝ”๋“œ ์ž์Šต์„œ


If you want to see more web design tutorials just like theseย ! Please consider subscribing to our Youtube Channel.


์ด ๊ธ€์˜ ์›๋ณธ ์ฝ”๋“œ๋Š” Github์—์„œ ์ฐพ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ๋ชจ๋“  ๊ทธ๋ฆผ๊ณผ ๋” ๋งŽ์€ ๋‚ด์šฉ์„ ํฌํ•จํ•˜๋ฏ€๋กœ, ์•„๋ž˜์— ์ œ์‹œ๋œ ๋งํฌ๋ฅผ ๋ฐฉ๋ฌธํ•˜์—ฌ ์›๋ณธ ์ฝ”๋“œ๋ฅผ ์–ป์œผ์‹ญ์‹œ์˜ค

Source Code Link


๋”ฐ๋ผ์„œ ์ด ์ธ์ฝ”๋”ฉ ๋ธ”๋กœ๊ทธ ๊ธ€์—์„œ ์šฐ๋ฆฌ๋Š” ๋‘ ๊ฐ€์ง€ ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ ํ˜„๋Œ€ ๊ตฌ์กฐ ๊ตฌ์ถ• ์‹œ์Šคํ…œ, ์ฆ‰ CSS Flexbox์™€ CSS Grid๋ฅผ ์†Œ๊ฐœํ•  ๊ฒƒ์ด๋‹ค.
๋„ˆ๋Š” ์ด ๋‘ ์‚ฌ๋žŒ์˜ ์ฃผ์š” ์ฐจ์ด๊ฐ€ ๋ฌด์—‡์ธ์ง€ ์•„๋‹ˆ?
๋งŒ์•ฝ ๊ทธ๋ ‡๋‹ค๋ฉด ๋‹น์‹ ์€ ์ ˆ๋Œ€์ ์ธ ์ฒœ์žฌ์ด์ง€๋งŒ, ๊ทธ๋ ‡์ง€ ์•Š๋‹ค๋ฉด, ๊ฐ„๋‹จํ•˜๊ฒŒ ์„ค๋ช…ํ•˜์ž๋ฉด, CSS Flexbox๋Š” 1์ฐจ์› ๋ ˆ์ด์•„์›ƒ ์‹œ์Šคํ…œ์ด๊ณ , CSS grid๋Š” 2์ฐจ์› ๋ ˆ์ด์•„์›ƒ ์‹œ์Šคํ…œ์ด๋‹ค.
ํ•  ์ˆ˜ ์žˆ๋‹ค๐Ÿ˜†, ์ง€๊ธˆ ์ด๋Œ€๋กœ!์ธ์ฝ”๋”ฉ ๋ถ€๋ถ„์œผ๋กœ ๋“ค์–ด๊ฐ‘์‹œ๋‹ค, ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค!!!
์šฐ์„  ํ”„๋กœ์ ํŠธ ํด๋” ๊ตฌ์กฐ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค๐Ÿ‘‡

ย 
์ผ๋ฐ˜์ ์œผ๋กœ ์šฐ๋ฆฌ๋Š” 4๊ฐœ์˜ ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๋ฐ, ๊ทธ ์ค‘์—์„œ๐Ÿ‘‡
  • Remixiconโ€Š-โ€Š์›๋ณธ์„ ์‹œ์ž‘ํ•˜๋Š” ์•„์ด์ฝ˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ
  • ๊ตฌ๊ธ€ ๊ธ€๊ผดโ€Š-โ€Š๊ธ€๊ผด์ด ์„œ๋น„์Šค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์Šคํฌ๋กค ์• ๋‹ˆ๋ฉ”์ด์…˜โ€Š-โ€Š์Šคํฌ๋กคํ•  ๋•Œ ํŽ˜์ด์ง€์˜ ์š”์†Œ์— ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋Š” ์ž‘์€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค.
  • ๊ทธ๋ฆฐ์Šคํ† ํฌ GSAPโ€Š-โ€Šํ˜„๋Œ€ ๋„คํŠธ์›Œํฌ์— ๋Œ€ํ•œ ์ „๋ฌธ์ ์ธ JavaScript ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
  • ๊ทธ๋ž˜์„œ ์œ„์˜ ํ”„๋กœ์ ํŠธ ํด๋” ๊ตฌ์กฐ๋ฅผ ๋ณด๋ฉด ์ƒ‰์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.html, ์Šคํƒ€์ผ.css, ์Šคํฌ๋ฆฝํŠธ.๋‹จ์ผ ์ด๋ฏธ์ง€ ํŒŒ์ผ์„ ์ €์žฅํ•˜๋Š” js&IMG ํด๋”์ž…๋‹ˆ๋‹ค.
    ๋”ฐ๋ผ์„œ ์ด ํŒŒ์ผ๋“ค์„ ๋งŒ๋“  ํ›„์— ๊ฐ€์žฅ ์ข‹์•„ํ•˜๋Š” ์ฝ”๋“œ ํŽธ์ง‘๊ธฐ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
    ์šฐ์„ , ๋ฃจํŠธ, HTML, ๋ณ€์ˆ˜ ๋ฆฌ์…‹์„ ํฌํ•จํ•œ CSS ํŒŒ์ผ์—์„œ ๊ธฐ๋ณธ์ ์ธ ๋ณ€๊ฒฝ์„ ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

    ํ’๊ฒฉcss


    /* ==== "Inter" FONT-FAMILY FROM FONTS.GOOGLE.COM ==== */
    @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");
    /* ==== ROOT RESET ==== */
    * {
    ย margin: 0;
    ย padding: 0;
    ย box-sizing: border-box;
    ย font-family: "Inter", sans-serif;
    }
    *,
    *::before,
    *::after {
    ย box-sizing: border-box;
    }
    /* ==== CSS VARIABLES ==== */
    :root {
    โ€Š-โ€Šprimary-color: #335eea;
    โ€Š-โ€Šlink-color: #506690;
    โ€Š-โ€Šbtn-hover-color: #2b50c7;
    โ€Š-โ€Šlg-heading: #161c2d;
    โ€Š-โ€Štext-content: #869ab8;
    โ€Š-โ€Šfixed-header-height: 4.5rem;
    }
    /* ==== RESET HTML ==== */
    body {
    ย width: 100%;
    ย height: 100vh;
    ย overflow-x: hidden;
    ย background-color: #fafbfb;
    }
    ul li {
    ย list-style-type: none;
    }
    a {
    ย text-decoration: none;
    }
    button {
    ย background-color: transparent;
    ย border: none;
    ย outline: none;
    ย cursor: pointer;
    }
    
    ์ข‹์•„, ์ข‹์•„!๋ผˆ๋Œ€, ์ฆ‰ HTML์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
    ๊ทธ๋Ÿฌ๋‹ˆ ์ €ํฌ ์ƒ‰์ธ์— ๋“ค์–ด์˜ค์„ธ์š”.html ํŒŒ์ผ๋กœ ๊ธฐ๋ณธ ํƒœ๊ทธ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    ์ƒ‰์ธhtml


    <!DOCTYPE html>
    <html lang="en">
    ย <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>Responsive Landing Page using HTML, CSS & Javascript</title>
    <!โ€Š-โ€Š==== STYLE.CSS ==== โ†’
    ย <link rel="stylesheet" href="./css/style.css" />
    <!โ€Š-โ€Š==== REMIXICON CDN ==== โ†’
    ย <link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet" />
    <!โ€Š-โ€Š==== ANIMATE ON SCROLL CSS CDN ==== โ†’
    ย <link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet" />
    ย </head>
    ย <body>
    ย <!โ€Š-โ€Š==== ANIMATE ON SCROLL JS CDN โ†’
    ย <script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
    ย <!โ€Š-โ€Š==== GSAP CDN ==== โ†’
    ย <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.8.0/gsap.min.js"></script>
    ย <!โ€Š-โ€Š==== SCRIPT.JS ==== โ†’
    ย <script src="./script.js" defer></script>
    ย </body>
    </html>
    
    ์•„์ฃผ ์ข‹์•„์š”!์ด์ œ ์กฐ๊ธˆ ๋” ๋„ค๋น„๊ฒŒ์ด์…˜์„ ๋งŒ๋“ค์–ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
    ๋„ˆ ๊ทธ๊ฑฐ ์•Œ์•„?ํƒ์ƒ‰ ๋ชจ์Œ์€ ๊ทธ๋ž˜ํ”ฝ ์‚ฌ์šฉ์ž ์ธํ„ฐํŽ˜์ด์Šค์˜ ์ผ๋ถ€๋กœ์„œ ๋ฐฉ๋ฌธ์ž๊ฐ€ ์ •๋ณด์— ์•ก์„ธ์Šคํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ค๋‹ˆ๋‹ค.

    ย 
    ํ•  ์ˆ˜ ์žˆ๋‹ค๐Ÿ˜†, ํ˜„์žฌ, ์ƒ‰์ธ์—navbar์— ํƒœ๊ทธ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.html ํŒŒ์ผ

    ์ƒ‰์ธhtml


    <!DOCTYPE html>
    <html lang="en">
    ย <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>Responsive Landing Page using HTML, CSS & Javascript</title>
    <!โ€Š-โ€Š==== STYLE.CSS ==== โ†’
    ย <link rel="stylesheet" href="./css/style.css" />
    <!โ€Š-โ€Š==== REMIXICON CDN ==== โ†’
    ย <link
    ย href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet" />
    <!โ€Š-โ€Š==== ANIMATE ON SCROLL CSS CDN ==== โ†’
    ย <link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet" />
    ย </head>
    ย <body>
    ย <!โ€Š-โ€Š==== HEADER ==== โ†’
    ย <header class="container header">
    ย <!โ€Š-โ€Š==== NAVBAR ==== โ†’
    ย <nav class="nav">
    ย <div class="logo">
    ย <h2>Devkit.</h2>
    ย </div>
    <div class="nav_menu" id="nav_menu">
    ย <button class="close_btn" id="close_btn">
    ย <i class="ri-close-fill"></i>
    ย </button>
    <ul class="nav_menu_list">
    ย <li class="nav_menu_item">
    ย <a href="#" class="nav_menu_link">account</a>
    ย </li>
    ย <li class="nav_menu_item">
    ย <a href="#" class="nav_menu_link">about</a>
    ย </li>
    ย <li class="nav_menu_item">
    ย <a href="#" class="nav_menu_link">service</a>
    ย </li>
    ย <li class="nav_menu_item">
    ย <a href="#" class="nav_menu_link">contact</a>
    ย </li>
    ย </ul>
    ย </div>
    <button class="toggle_btn" id="toggle_btn">
    ย <i class="ri-menu-line"></i>
    ย </button>
    ย </nav>
    ย </header>
    <!โ€Š-โ€Š==== ANIMATE ON SCROLL JS CDN โ†’
    ย <script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
    ย <!โ€Š-โ€Š==== GSAP CDN ==== โ†’
    ย <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.8.0/gsap.min.js"></script>
    ย <!โ€Š-โ€Š==== SCRIPT.JS ==== โ†’
    ย <script src="./script.js" defer></script>
    ย </body>
    </html>
    

    ๋” ๋ณด๊ธฐ ์ข‹๊ฒŒ ์œ„์— ์Šคํƒ€์ผ์„ ์ถ”๊ฐ€ํ•ฉ์‹œ๋‹ค.

    ํ’๊ฒฉcss


    /* ==== CONTAINER ==== */
    .container {
    ย width: 100%;
    }
    @media screen and (min-width: 1040px) {
    ย .container {
    ย width: 1040px;
    ย margin: 0 auto;
    ย }
    }
    /* ==== HEADER ==== */
    .header {
    ย height: var(โ€Š-โ€Šfixed-header-height);
    ย padding: 0 1.7rem;
    }
    /* ==== NAV ==== */
    .nav {
    ย width: 100%;
    ย height: 100%;
    ย display: flex;
    ย align-items: center;
    ย justify-content: space-between;
    }
    /* ==== LOGO ==== */
    .logo h2 {
    ย font-size: 28px;
    ย color: var(โ€Š-โ€Šprimary-color);
    }
    /* ==== NAV-MENU ==== */
    .nav_menu_list {
    ย display: flex;
    ย align-items: center;
    }
    .nav_menu_listย .nav_menu_item {
    ย margin: 0 2rem;
    }
    .nav_menu_itemย .nav_menu_link {
    ย font-size: 16.5px;
    ย line-height: 27px;
    ย color: var(โ€Š-โ€Šlink-color);
    ย text-transform: capitalize;
    ย letter-spacing: 0.5px;
    }
    .nav_menu_link:hover {
    ย color: var(โ€Š-โ€Šprimary-color);
    }
    .toggle_btn {
    ย font-size: 20px;
    ย font-weight: 600;
    ย color: var(โ€Š-โ€Šlg-heading);
    ย z-index: 4;
    }
    .nav_menu,
    .close_btn {
    ย display: none;
    }
    .show {
    ย right: 3%ย !important;
    }
    

    ๊ฒฐ์‹ค



    ์ด์ œ ๋””๋ฐ”์ด์Šค์˜ ์ฐจ์ด์— ์‘๋‹ตํ•  ์ˆ˜ ์žˆ๋Š” ๋งˆ์ง€๋ง‰ ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค.
    ๋”ฐ๋ผ์„œ ์ด๋ฅผ ์‹คํ˜„ํ•˜๊ธฐ ์œ„ํ•ด ์šฐ๋ฆฌ๋Š” ๋‚ด๋น„๊ฒŒ์ด์…˜ ํ‘œ์‹œ์ค„์— ๋ฏธ๋””์–ด ์กฐํšŒ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์šฐ๋ฆฌ์˜ ์Šคํƒ€์ผ๋กœ ๋“ค์–ด๊ฐ€์•ผ ํ•œ๋‹ค.css ํŒŒ์ผ์„ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.

    ํ’๊ฒฉcss


    /* ==== MEDIA QURIES FOR RESPONSIVE DESIGN ==== */
    @media screen and (min-width: 768px) {
    ย .toggle_btn {
    ย display: none;
    ย }
    ย .nav_menu {
    ย display: block;
    ย }
    }
    @media screen and (max-width: 768px) {
    ย .logo h2 {
    ย font-size: 23px;
    ย }
    ย .nav_menu {
    ย position: fixed;
    ย width: 93%;
    ย height: 100%;
    ย display: block;
    ย top: 2.5%;
    ย right: -100%;
    ย background-color: #fff;
    ย padding: 3rem;
    ย border-radius: 10px;
    ย box-shadow: 0 0.5rem 1.5rem rgba(22, 28, 45, 0.1);
    ย z-index: 50;
    ย transition: 0.4s;
    ย }
    ย .nav_menu_list {
    ย flex-direction: column;
    ย align-items: flex-start;
    ย margin-top: 4rem;
    ย }
    ย .nav_menu_listย .nav_menu_item {
    ย margin: 1rem 0;
    ย }
    ย .nav_menu_itemย .nav_menu_link {
    ย font-size: 18px;
    ย }
    }
    
    ย 

    ย 
    ์—ฌ๊ธฐ์—์„œ, ์šฐ๋ฆฌ๋Š” ๋„ค๋น„๊ฒŒ์ด์…˜ ๋งํฌ๊ฐ€ ์ด๋™ ํ™”๋ฉด์— ์ˆจ๊ฒจ์ ธ ์žˆ๊ณ , ๋ฐ์Šคํฌํ†ฑ ํ™”๋ฉด์—์„œ ๋ณผ ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ๊ด€์ฐฐํ–ˆ๋‹ค.๊ทธ๋ž˜์„œ ์—ฌ๊ธฐ์— ์ž‘์€ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ด์„œ ๋‚ด๋น„๊ฒŒ์ด์…˜ ๋งํฌ๋ฅผ ๋ฉ”๋‰ด ์ „ํ™˜ ๋‹จ์ถ”๋ฅผ ๋ˆ„๋ฅด๋ฉด ๋ณผ ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค
    ์ด์ œ ์šฐ๋ฆฌ ๊ฐ๋ณธ์œผ๋กœ ๋“ค์–ด๊ฐ€.๋…ผ๋ฆฌ์  js ํŒŒ์ผ ์ถ”๊ฐ€๐Ÿง 

    ๊ฐ๋ณธjs


    const navId = document.getElementById("nav_menu"),
    ย ToggleBtnId = document.getElementById("toggle_btn"),
    ย CloseBtnId = document.getElementById("close_btn");
    // ==== SHOW MENU ==== //
    ToggleBtnId.addEventListener("click", () => {
    ย navId.classList.add("show");
    });
    // ==== HIDE MENU ==== //
    CloseBtnId.addEventListener("click", () => {
    ย navId.classList.remove("show");
    });
    

    GIF ํ˜•์‹ ์ƒ์„ฑ



    "์˜์›…"๋ถ€๋ถ„์„ ํ•œ์ธต ๋” ์ œ์ž‘ํ•˜๊ณ , ์ด ๋ถ€๋ถ„์€ ๊ท€์‚ฌ์™€ ์ œํ’ˆ์— ๋Œ€ํ•œ ์ผ๋ณ„์„ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค.

    ์ƒ‰์ธhtml


    <!DOCTYPE html>
    <html lang="en">
    ย <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>Responsive Landing Page using HTML, CSS & Javascript</title>
    <!โ€Š-โ€Š==== STYLE.CSS ==== โ†’
    ย <link rel="stylesheet" href="./css/style.css" />
    <!โ€Š-โ€Š==== REMIXICON CDN ==== โ†’
    ย <link
    ย href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css"
    ย rel="stylesheet"
    ย />
    <!โ€Š-โ€Š==== ANIMATE ON SCROLL CSS CDN ==== โ†’
    ย <link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet" />
    ย </head>
    ย <body>
    ย <!โ€Š-โ€Š==== HEADER ==== โ†’
    ย <header class="container header">
    ย <!โ€Š-โ€Š==== NAVBAR ==== โ†’
    ย <nav class="nav">
    ย <div class="logo">
    ย <h2>Devkit.</h2>
    ย </div>
    <div class="nav_menu" id="nav_menu">
    ย <button class="close_btn" id="close_btn">
    ย <i class="ri-close-fill"></i>
    ย </button>
    <ul class="nav_menu_list">
    ย <li class="nav_menu_item">
    ย <a href="#" class="nav_menu_link">account</a>
    ย </li>
    ย <li class="nav_menu_item">
    ย <a href="#" class="nav_menu_link">about</a>
    ย </li>
    ย <li class="nav_menu_item">
    ย <a href="#" class="nav_menu_link">service</a>
    ย </li>
    ย <li class="nav_menu_item">
    ย <a href="#" class="nav_menu_link">contact</a>
    ย </li>
    ย </ul>
    ย </div>
    <button class="toggle_btn" id="toggle_btn">
    ย <i class="ri-menu-line"></i>
    ย </button>
    ย </nav>
    ย </header>
    <!โ€Š-โ€Š==== HERO ==== โ†’
    ย <section class="wrapper">
    ย <div class="container">
    ย <div class="grid-cols-2">
    ย <div class="grid-item-1">
    ย <h1 class="main-heading">
    ย Welcome to <span>Devkit.</span>
    ย <br />
    ย Develop anything.
    ย </h1>
    ย <p class="info-text">
    ย Build a beautiful, modern website with flexible components built
    ย from scratch.
    ย </p>
    <div class="btn_wrapper">
    ย <button class="btn view_more_btn">
    ย view all pages <i class="ri-arrow-right-line"></i>
    ย </button>
    <button class="btn documentation_btn">documentation</button>
    ย </div>
    ย </div>
    ย <div class="grid-item-2">
    ย <div class="team_img_wrapper">
    ย <img src="./img/team.svg" alt="team-img" />
    ย </div>
    ย </div>
    ย </div>
    ย </div>
    ย </section>
    <!โ€Š-โ€Š==== ANIMATE ON SCROLL JS CDN โ†’
    ย <script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
    ย <!โ€Š-โ€Š==== GSAP CDN ==== โ†’
    ย <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.8.0/gsap.min.js"></script>
    ย <!โ€Š-โ€Š==== SCRIPT.JS ==== โ†’
    ย <script src="./script.js" defer></script>
    

    ํ’๊ฒฉcss


    /* ==== WRAPPER ==== */
    .wrapper {
    ย width: 100%;
    ย padding-left: 1.7rem;
    ย padding-right: 1.7rem;
    ย padding-top: 5rem;
    ย margin-bottom: 5rem;
    }
    .grid-cols-2 {
    ย width: 100%;
    ย height: 100%;
    ย display: grid;
    ย grid-template-columns: repeat(2, 1fr);
    ย gap: 4rem;
    }
    .grid-item-1 {
    ย padding-top: 5rem;
    ย padding-left: 1.5rem;
    }
    .main-heading {
    ย font-weight: 300;
    ย font-size: 40px;
    ย line-height: 55px;
    }
    .main-heading span {
    ย color: var(โ€Š-โ€Šprimary-color);
    }
    .info-text {
    ย margin-top: 1.5rem;
    ย font-size: 19px;
    ย line-height: 28px;
    ย color: #334157;
    }
    .btn_wrapper {
    ย margin-top: 3.5rem;
    ย display: flex;
    ย width: 100%;
    }
    .btn {
    ย width: 110px;
    ย height: 50px;
    ย background-color: var(โ€Š-โ€Šprimary-color);
    ย display: block;
    ย font-size: 16px;
    ย color: #fff;
    ย text-transform: capitalize;
    ย border-radius: 7px;
    ย letter-spacing: 1px;
    ย transition: 0.4s;
    }
    .btn:hover {
    ย transform: translateY(-3px);
    ย background-color: var(โ€Š-โ€Šbtn-hover-color);
    }
    .view_more_btn {
    ย width: 180px;
    ย height: 55px;
    ย display: flex;
    ย align-items: center;
    ย justify-content: center;
    ย font-size: 16px;
    ย letter-spacing: 0;
    ย color: #fff;
    ย font-weight: 500;
    ย margin-right: 10px;
    ย box-shadow: 0 0.5rem 1.5rem rgba(22, 28, 45, 0.1);
    }
    .view_more_btn i {
    ย margin-left: 0.7rem;
    }
    .view_more_btn:hover {
    ย transition: box-shadow 0.25s ease, transform 0.25s ease;
    }
    .documentation_btn {
    ย width: 150px;
    ย height: 55px;
    ย font-size: 16px;
    ย font-weight: 500;
    ย color: #fff;
    ย letter-spacing: 0;
    ย background-color: #e1e7fc;
    ย color: #0e2a86;
    ย box-shadow: 0 0.5rem 1.5rem rgba(22, 28, 45, 0.1);
    }
    .documentation_btn:hover {
    ย background-color: #d7ddf1;
    ย transition: box-shadow 0.25s ease, transform 0.25s ease;
    }
    .grid-item-2 {
    ย width: 100%;
    ย height: 100%;
    }
    .team_img_wrapper {
    ย width: 500px;
    ย max-width: 100%;
    ย height: 440px;
    }
    .team_img_wrapper img {
    ย width: 100%;
    ย height: 100%;
    ย object-fit: contain;
    }
    @media screen and (max-width: 768px) {
    ย .logo h2 {
    ย font-size: 23px;
    ย }
    ย .nav_menu {
    ย position: fixed;
    ย width: 93%;
    ย height: 100%;
    ย display: block;
    ย top: 2.5%;
    ย right: -100%;
    ย background-color: #fff;
    ย padding: 3rem;
    ย border-radius: 10px;
    ย box-shadow: 0 0.5rem 1.5rem rgba(22, 28, 45, 0.1);
    ย z-index: 50;
    ย transition: 0.4s;
    ย }
    ย .nav_menu_list {
    ย flex-direction: column;
    ย align-items: flex-start;
    ย margin-top: 4rem;
    ย }
    ย .nav_menu_listย .nav_menu_item {
    ย margin: 1rem 0;
    ย }
    ย .nav_menu_itemย .nav_menu_link {
    ย font-size: 18px;
    ย }
    ย .close_btn {
    ย display: block;
    ย position: absolute;
    ย right: 10%;
    ย font-size: 25px;
    ย color: #50689e;
    ย }
    ย .close_btn:hover {
    ย color: #000;
    ย }
    .wrapper {
    ย padding: 0 0.7rem;
    ย }
    ย .grid-item-1 {
    ย padding-left: 0rem;
    ย }
    ย .main-heading {
    ย font-size: 35px;
    ย }
    ย .view_more_btn {
    ย width: 140px;
    ย height: 55px;
    ย font-size: 13.5px;
    ย margin-right: 1rem;
    ย }
    }
    @media screen and (max-width: 991px) {
    ย .wrapper {
    ย padding-top: 3rem;
    ย }
    ย .grid-cols-2 {
    ย grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    ย }
    ย .grid-item-1 {
    ย order: 2;
    ย display: flex;
    ย flex-direction: column;
    ย align-items: center;
    ย justify-content: center;
    ย padding-top: 0;
    ย }
    ย .main-heading {
    ย font-size: 32px;
    ย text-align: center;
    ย line-height: 40px;
    ย }
    ย .info-text {
    ย font-size: 16px;
    ย text-align: center;
    ย padding: 0.7rem;
    ย }
    ย .btn_wrapper {
    ย width: 100%;
    ย display: flex;
    ย align-items: center;
    ย justify-content: center;
    ย }
    ย .grid-item-2 {
    ย order: 1;
    ย display: flex;
    ย flex-direction: column;
    ย align-items: center;
    ย justify-content: center;
    ย }
    ย .team_img_wrapper {
    ย width: 350px;
    ย height: 350px;
    ย }
    }
    

    ๊ฒฐ์‹ค




    ์ข‹์Šต๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ํฐ ์ง„์ „์„ ๊ฑฐ๋‘๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์ œ ๋งˆ์ง€๋ง‰ ๊ตฌ์„ฑ ๋ถ€๋ถ„์œผ๋กœ ๋“ค์–ด๊ฐ‘๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ํŠน์ƒ‰ ์žˆ๋Š” ์ •๋ณด์™€ ํŽ˜์ด์ง€์˜ ๋๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.

    ์ƒ‰์ธhtml


    <!โ€Š-โ€Š==== NAVBAR ==== โ†’
    ย <!โ€Š-โ€Š==== HERO ==== โ†’
    <section class="wrapper">
    ย <div class="container">
    ย <div class="grid-cols-3">
    ย <div class="grid-col-item">
    ย <div class="icon">
    ย <svg
    ย xmlns="http://www.w3.org/2000/svg"
    ย fill="none"
    ย viewBox="0 0 24 24"
    ย stroke="currentColor"
    ย >
    ย <path
    ย stroke-linecap="round"
    ย stroke-linejoin="round"
    ย stroke-width="2"
    ย d="M9.75 17L9 20l-1 1h8l-1โ€“1-.75โ€“3M3 13h18M5 17h14a2 2 0 002โ€“2V5a2 2 0 00โ€“2โ€“2H5a2 2 0 00โ€“2 2v10a2 2 0 002 2z"
    ย />
    ย </svg>
    ย </div>
    ย <div class="featured_info">
    ย <span>Built for developers </span>
    ย <p>
    ย Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore
    ย ratione facilis animi voluptas exercitationem molestiae.
    ย </p>
    ย </div>
    ย </div>
    ย <div class="grid-col-item">
    ย <div class="icon">
    ย <svg
    ย xmlns="http://www.w3.org/2000/svg"
    ย fill="none"
    ย viewBox="0 0 24 24"
    ย stroke="currentColor"
    ย >
    ย <path
    ย stroke-linecap="round"
    ย stroke-linejoin="round"
    ย stroke-width="2"
    ย d="M17 14v6m-3โ€“3h6M6 10h2a2 2 0 002โ€“2V6a2 2 0 00โ€“2โ€“2H6a2 2 0 00โ€“2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002โ€“2V6a2 2 0 00โ€“2โ€“2h-2a2 2 0 00โ€“2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002โ€“2v-2a2 2 0 00โ€“2โ€“2H6a2 2 0 00โ€“2 2v2a2 2 0 002 2z"
    ย />
    ย </svg>
    ย </div>
    ย <div class="featured_info">
    ย <span>Designed to be modern</span>
    ย <p>
    ย Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut
    ย ipsum esse corrupti. Quo, labore debitis!
    ย </p>
    ย </div>
    ย </div>
    <div class="grid-col-item">
    ย <div class="icon">
    ย <svg
    ย xmlns="http://www.w3.org/2000/svg"
    ย fill="none"
    ย viewBox="0 0 24 24"
    ย stroke="currentColor"
    ย >
    ย <path
    ย stroke-linecap="round"
    ย stroke-linejoin="round"
    ย stroke-width="2"
    ย d="M10 20l4โ€“16m4 4l4 4โ€“4 4M6 16l-4โ€“4 4โ€“4"
    ย />
    ย </svg>
    ย </div>
    ย <div class="featured_info">
    ย <span>Documentation for everything</span>
    ย <p>
    ย Lorem ipsum dolor sit amet consectetur adipisicing elit. Non
    ย nostrum voluptate totam ipsa corrupti vero!
    ย </p>
    ย </div>
    ย </div>
    ย </div>
    ย </div>
    ย </section>
    <footer></footer>
    

    ํ’๊ฒฉcss


    /* ==== RESET CSS ==== */
    /* ==== Navbar ==== */
    /* ==== Hero Section ==== */
    /*
    .
    .
    .
    .
    .
    */
    .grid-cols-3 {
    ย width: 100%;
    ย height: 100%;
    ย display: grid;
    ย grid-template-columns: repeat(3, 1fr);
    ย column-gap: 3rem;
    ย row-gap: 2rem;
    ย padding: 1rem;
    }
    .grid-col-item {
    ย height: 100%;
    }
    .icon {
    ย width: 100%;
    ย line-height: 40px;
    }
    .icon svg {
    ย width: 30px;
    ย height: 30px;
    ย color: #6b85d8;
    }
    .featured_info {
    ย width: 100%;
    }
    .featured_info span {
    ย width: 100%;
    ย display: block;
    ย font-size: 21px;
    ย line-height: 33px;
    ย color: var(โ€Š-โ€Šlg-heading);
    }
    .featured_info p {
    ย display: block;
    ย width: 100%;
    ย margin-top: 7px;
    ย font-weight: 400;
    ย color: #334157;
    ย line-height: 25px;
    ย font-size: 15.5px;
    }
    footer {
    ย width: 100%;
    ย background-color: var(โ€Š-โ€Šprimary-color);
    ย height: 12px;
    ย margin-top: 8rem;
    }
    @media screen and (max-width: 768px) {
    ย .grid-cols-3 {
    ย grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    ย }
    ย .featured_info p {
    ย line-height: 23px;
    ย font-size: 14px;
    ย }
    }
    @media screen and (max-width: 991px) {
    ย .featured_info span {
    ย font-size: 19px;
    ย }
    }
    

    ๊ฒฐ์‹ค



    ์ด์ œ ์ด ๊ธ€์„ ๋๋‚ด๊ณ  ์• ๋‹ˆ๋ฉ”์ด์…˜์— ์Šคํฌ๋กค ์†์„ฑ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. ์ด ์†์„ฑ์„ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” HTML ํŒŒ์ผ์— data- ์†์„ฑ์„ ์ถ”๊ฐ€ํ•œ ๋‹ค์Œ ์Šคํฌ๋ฆฝํŠธ js์—์„œ ์ดˆ๊ธฐํ™”ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
    ์šฐ๋ฆฌ ์˜ ํŠน์ƒ‰ ๋ถ€๋ถ„ ์„ ์กฐ๊ธˆ ๋ฐ”๊พธ์ž. ๋ฐ”๋กœ๐Ÿ‘‡
    <section class="wrapper">
    ย <!โ€Š-โ€Š==== ADDITION OF data- attribute ==== โ†’
    ย <div class="container" data-aos="fade-up" data-aos-duration="1000">
    ย <div class="grid-cols-3">
    ย <div class="grid-col-item">
    ย <div class="icon">
    ย <svg
    ย xmlns="http://www.w3.org/2000/svg"
    ย fill="none"
    ย viewBox="0 0 24 24"
    ย stroke="currentColor"
    ย >
    ย <path
    ย stroke-linecap="round"
    ย stroke-linejoin="round"
    ย stroke-width="2"
    ย d="M9.75 17L9 20l-1 1h8l-1โ€“1-.75โ€“3M3 13h18M5 17h14a2 2 0 002โ€“2V5a2 2 0 00โ€“2โ€“2H5a2 2 0 00โ€“2 2v10a2 2 0 002 2z"
    ย />
    ย </svg>
    ย </div>
    ย <div class="featured_info">
    ย <span>Built for developers </span>
    ย <p>
    ย Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore
    ย ratione facilis animi voluptas exercitationem molestiae.
    ย </p>
    ย </div>
    ย </div>
    ย <div class="grid-col-item">
    ย <div class="icon">
    ย <svg
    ย xmlns="http://www.w3.org/2000/svg"
    ย fill="none"
    ย viewBox="0 0 24 24"
    ย stroke="currentColor"
    ย >
    ย <path
    ย stroke-linecap="round"
    ย stroke-linejoin="round"
    ย stroke-width="2"
    ย d="M17 14v6m-3โ€“3h6M6 10h2a2 2 0 002โ€“2V6a2 2 0 00โ€“2โ€“2H6a2 2 0 00โ€“2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002โ€“2V6a2 2 0 00โ€“2โ€“2h-2a2 2 0 00โ€“2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002โ€“2v-2a2 2 0 00โ€“2โ€“2H6a2 2 0 00โ€“2 2v2a2 2 0 002 2z"
    ย />
    ย </svg>
    ย </div>
    ย <div class="featured_info">
    ย <span>Designed to be modern</span>
    ย <p>
    ย Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut
    ย ipsum esse corrupti. Quo, labore debitis!
    ย </p>
    ย </div>
    ย </div>
    <div class="grid-col-item">
    ย <div class="icon">
    ย <svg
    ย xmlns="http://www.w3.org/2000/svg"
    ย fill="none"
    ย viewBox="0 0 24 24"
    ย stroke="currentColor"
    ย >
    ย <path
    ย stroke-linecap="round"
    ย stroke-linejoin="round"
    ย stroke-width="2"
    ย d="M10 20l4โ€“16m4 4l4 4โ€“4 4M6 16l-4โ€“4 4โ€“4"
    ย />
    ย </svg>
    ย </div>
    ย <div class="featured_info">
    ย <span>Documentation for everything</span>
    ย <p>
    ย Lorem ipsum dolor sit amet consectetur adipisicing elit. Non
    ย nostrum voluptate totam ipsa corrupti vero!
    ย </p>
    ย </div>
    ย </div>
    ย </div>
    ย </div>
    ย </section>
    

    ๊ฐ๋ณธjs


    // ==== Animate on Scroll Initialize ==== //
    AOS.init();
    
    js ํŒŒ์ผ์— ๋ฐ์ดํ„ฐ-attribute์™€ initialize AOS๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด ์ž‘์€ ํŽ˜์ด๋“œ ํšจ๊ณผ๋ฅผ ์ค๋‹ˆ๋‹ค.
    ์ž˜ ๋๋‹ค!ํ˜„์žฌ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ GSAP ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ์ถ”๊ฐ€ํ•ด์„œ ํ”„๋กœ์ ํŠธ๋ฅผ ๋๋ƒ…๋‹ˆ๋‹ค.

    ๊ฐ๋ณธjs


    // ==== GSAP Animations ==== //
    // ==== LOGO ==== //
    gsap.from(".logo", {
    ย opacity: 0,
    ย y: -10,
    ย delay: 1,
    ย duration: 0.5,
    });
    // ==== NAV-MENU ==== //
    gsap.from(".nav_menu_listย .nav_menu_item", {
    ย opacity: 0,
    ย y: -10,
    ย delay: 1.4,
    ย duration: 0.5,
    ย stagger: 0.3,
    });
    // ==== TOGGLE BTN ==== //
    gsap.from(".toggle_btn", {
    ย opacity: 0,
    ย y: -10,
    ย delay: 1.4,
    ย duration: 0.5,
    });
    // ==== MAIN HEADING ==== //
    gsap.from(".main-heading", {
    ย opacity: 0,
    ย y: 20,
    ย delay: 2.4,
    ย duration: 1,
    });
    // ==== INFO TEXT ==== //
    gsap.from(".info-text", {
    ย opacity: 0,
    ย y: 20,
    ย delay: 2.8,
    ย duration: 1,
    });
    // ==== CTA BUTTONS ==== //
    gsap.from(".btn_wrapper",ย 
    ย opacity: 0,
    ย y: 20,
    ย delay: 2.8,
    ย duration: 1,
    });
    // ==== TEAM IMAGE ==== //
    gsap.from(".team_img_wrapper img", {
    ย opacity: 0,
    ย y: 20,
    ย delay: 3,
    ย duration: 1,
    });
    
    ย 

    And that's it guys here we end our project! Thank you so much for reading the post till the endย !!! Please Make sure you check out my Youtube Channel where I post this kind of coding tutorial.


    ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!์ฆ๊ฑฐ์›€ ์ฝ”๋“œ

    ์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ