Tailwind CSS Academy · 강의

히어로 및 탐색 섹션

고정 내비게이션 바가 있는 페이지 머리글과 제목, 보조 설명, CTA 버튼, 장식용 배경 그라데이션을 포함한 히어로 섹션을 만듭니다.

레슨 1/413개 단계

히어로 및 탐색 섹션은(는) CoddyKit의 무료 Tailwind CSS Academy 강의입니다. 이것은 4개 중 1번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Tailwind CSS Academy 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Tailwind CSS Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Planning the Landing Page Layout

A marketing landing page typically follows a predictable structure: sticky navbar at the top, a hero section with a headline and CTA, followed by features, testimonials, pricing, and a footer. Starting with the navbar and hero lets you establish the page's visual tone and establishes the vertical rhythm for everything that follows.

<!-- Page structure overview -->
<body class="bg-white text-gray-900">
  <header><!-- Sticky navbar --></header>
  <main>
    <section><!-- Hero --></section>
    <section><!-- Features --></section>
    <section><!-- Testimonials --></section>
    <section><!-- Pricing --></section>
  </main>
  <footer><!-- Footer --></footer>
</body>

Building the Sticky Navbar Shell

Use sticky top-0 z-50 to keep the navbar visible as users scroll. Add bg-white/90 backdrop-blur-sm for a modern frosted glass appearance. The border-b border-gray-200 creates a subtle separator from the page content. Wrap everything in a max-w-7xl mx-auto px-4 container to constrain the nav width on large screens.

<header class="sticky top-0 z-50 border-b border-gray-200 bg-white/90 backdrop-blur-sm">
  <nav class="mx-auto flex max-w-7xl items-center justify-between px-4 py-4">
    <!-- Logo -->
    <!-- Nav links -->
    <!-- CTA button -->
  </nav>
</header>

Adding the Logo and Nav Links

Place the logo on the left using flex items-center gap-2. The navigation links live in the center as a flex row with hidden md:flex gap-6 — hidden on mobile, visible from medium screens upward. Each link uses text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors for a clean interactive feel.

<nav class="mx-auto flex max-w-7xl items-center justify-between px-4 py-4">
  <!-- Logo -->
  <a href="/" class="flex items-center gap-2 font-bold text-gray-900">
    <div class="h-8 w-8 rounded-lg bg-blue-600"></div>
    Launchify
  </a>

  <!-- Nav links (hidden on mobile) -->
  <div class="hidden gap-8 md:flex">
    <a href="#features" class="text-sm font-medium text-gray-600 transition-colors hover:text-gray-900">Features</a>
    <a href="#pricing" class="text-sm font-medium text-gray-600 transition-colors hover:text-gray-900">Pricing</a>
    <a href="#about" class="text-sm font-medium text-gray-600 transition-colors hover:text-gray-900">About</a>
  </div>
</nav>

Adding the CTA Button to Navbar

Place a call-to-action button on the right side of the navbar. The primary CTA uses a filled background bg-blue-600 text-white, while a secondary ghost link or sign-in link can sit beside it. Keep buttons compact in the navbar with px-4 py-2 text-sm to avoid dominating the header space.

<div class="flex items-center gap-3">
  <a href="/login"
     class="hidden text-sm font-medium text-gray-600 hover:text-gray-900 md:inline">
    Log in
  </a>
  <a href="/signup"
     class="rounded-lg bg-blue-600 px-4 py-2 text-sm font-semibold text-white
            shadow-sm transition hover:bg-blue-700">
    Get started
  </a>
  <!-- Hamburger for mobile -->
  <button class="rounded-md p-2 text-gray-600 hover:bg-gray-100 md:hidden">
    <svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
      <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
            d="M4 6h16M4 12h16M4 18h16"/>
    </svg>
  </button>
</div>

Hero Section Layout

The hero section is typically the most impactful part of the page. Center its content vertically and horizontally using flex flex-col items-center justify-center text-center. Set a generous minimum height with min-h-[calc(100vh-4rem)] to fill the viewport below the navbar, and add px-4 py-24 for breathing room.

<section class="flex min-h-[calc(100vh-4rem)] flex-col items-center
               justify-center px-4 py-24 text-center">
  <!-- Badge -->
  <!-- Headline -->
  <!-- Subtext -->
  <!-- CTA buttons -->
  <!-- Hero image / illustration -->
</section>

Adding a Background Gradient

Give the hero visual depth with a subtle radial or linear gradient. Using bg-gradient-to-b from-blue-50 to-white creates a gentle fade from a tinted top to a clean white bottom. For a more dramatic effect, combine a gradient with a decorative blob positioned absolutely behind the content.

<section class="relative flex min-h-[calc(100vh-4rem)] flex-col items-center
               justify-center overflow-hidden bg-gradient-to-b
               from-blue-50 to-white px-4 py-24 text-center">
  <!-- Decorative blob -->
  <div class="absolute -top-40 left-1/2 h-[500px] w-[500px] -translate-x-1/2
              rounded-full bg-blue-100 opacity-40 blur-3xl"></div>
  <!-- Content on top of blob -->
  <div class="relative z-10">
    <!-- Hero content here -->
  </div>
</section>

Hero Headline and Subtext

The headline is the most important text on the page. Use large text like text-4xl md:text-6xl font-extrabold tracking-tight text-gray-900 to command attention. Follow it with a subheading in mt-6 max-w-2xl text-lg text-gray-500. Limit the subtext width with max-w-2xl mx-auto to keep line lengths readable.

<div class="relative z-10 flex flex-col items-center">
  <!-- Eyebrow badge -->
  <span class="mb-4 rounded-full bg-blue-100 px-4 py-1.5 text-xs font-semibold
               uppercase tracking-widest text-blue-700">
    Now in Public Beta
  </span>

  <!-- Headline -->
  <h1 class="text-4xl font-extrabold tracking-tight text-gray-900 md:text-6xl">
    Ship faster with
    <span class="text-blue-600">Launchify</span>
  </h1>

  <!-- Subtext -->
  <p class="mx-auto mt-6 max-w-2xl text-lg text-gray-500">
    The all-in-one platform for indie makers to build, launch, and grow
    their SaaS products without the infrastructure headaches.
  </p>
</div>

Hero CTA Buttons

Provide a primary and secondary CTA button below the subtext. Use mt-10 flex flex-col items-center gap-4 sm:flex-row so they stack on mobile and go side by side on small screens and above. The primary button uses a filled style, while the secondary uses an outline or ghost treatment to establish clear hierarchy.

<div class="mt-10 flex flex-col items-center gap-4 sm:flex-row">
  <!-- Primary CTA -->
  <a href="/signup"
     class="rounded-xl bg-blue-600 px-8 py-3.5 text-base font-semibold
            text-white shadow-lg transition hover:bg-blue-700
            focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
    Start for free
  </a>

  <!-- Secondary CTA -->
  <a href="#demo"
     class="flex items-center gap-2 text-base font-semibold text-gray-700
            transition hover:text-gray-900">
    <span class="flex h-8 w-8 items-center justify-center rounded-full bg-gray-100">
      &#9654;
    </span>
    Watch demo
  </a>
</div>

Hero Social Proof Strip

Below the CTAs, add a lightweight social proof element such as avatar stacks and a star rating. This reassures first-time visitors without distracting from the primary CTA. Use negative margins on overlapping avatars with -ml-2 and a small rounded ring to give each avatar a distinctive border.

<div class="mt-10 flex flex-col items-center gap-2">
  <!-- Avatars -->
  <div class="flex -space-x-2">
    <img class="h-8 w-8 rounded-full ring-2 ring-white" src="/avatar1.jpg" alt="User">
    <img class="h-8 w-8 rounded-full ring-2 ring-white" src="/avatar2.jpg" alt="User">
    <img class="h-8 w-8 rounded-full ring-2 ring-white" src="/avatar3.jpg" alt="User">
    <div class="flex h-8 w-8 items-center justify-center rounded-full
                bg-blue-100 text-xs font-semibold text-blue-700 ring-2 ring-white">
      +2k
    </div>
  </div>
  <!-- Stars -->
  <p class="text-sm text-gray-500">
    <span class="text-yellow-400">&#9733;&#9733;&#9733;&#9733;&#9733;</span>
    Loved by 2,000+ makers
  </p>
</div>

Hero Screenshot or Illustration

A product screenshot or illustration below the copy gives visitors a preview of what they are signing up for. Use mt-16 rounded-2xl shadow-2xl border border-gray-200 overflow-hidden to present it in a polished frame. On mobile, make it full width; on larger screens, constrain with max-w-4xl mx-auto.

<div class="mx-auto mt-16 max-w-4xl">
  <div class="overflow-hidden rounded-2xl border border-gray-200 shadow-2xl">
    <img
      src="/screenshot.png"
      alt="Launchify dashboard preview"
      class="w-full"
    />
  </div>
</div>

Responsive Hero Adjustments

Review the hero at every breakpoint. On mobile, the headline size drops from text-6xl to text-4xl. The CTA buttons stack vertically with flex-col and switch to sm:flex-row at the small breakpoint. The screenshot may need hidden md:block if it is too small to be useful on phones. Always test on a real mobile viewport.

<!-- Responsive headline example -->
<h1 class="text-3xl font-extrabold tracking-tight text-gray-900
           sm:text-5xl md:text-6xl lg:text-7xl">
  Ship faster with Launchify
</h1>

<!-- Hide large screenshot on mobile -->
<div class="mx-auto mt-16 hidden max-w-4xl md:block">
  <img src="/screenshot.png" class="w-full rounded-2xl shadow-2xl" alt="Dashboard">
</div>

Quick Check

Test your understanding of Tailwind CSS Mastery concepts from this lesson.

Lesson Recap

In this lesson you learned: building a sticky frosted-glass navbar with logo, links, and CTA, creating a hero section with gradient background, headline, subtext, and social proof, and adding responsive adjustments for mobile and desktop breakpoints. Next up we build the features and social proof sections.

무료로 시작

AI 튜터와 함께 HTML을(를) 배우세요 — 무료

브라우저에서 실제 코드를 작성하고 실행하며, 24/7 AI 튜터로부터 즉각적인 도움을 받고, 웹이나 앱에서 중단한 부분부터 계속 학습하세요.

코스
30
레슨
120

자주 묻는 질문

“히어로 및 탐색 섹션” 강의는 무료인가요?

네 — “히어로 및 탐색 섹션” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Tailwind CSS Academy 강의 전체를 잠금 해제할 수 있습니다. Tailwind CSS Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

“히어로 및 탐색 섹션”에서 뭘 배우나요?

고정 내비게이션 바가 있는 페이지 머리글과 제목, 보조 설명, CTA 버튼, 장식용 배경 그라데이션을 포함한 히어로 섹션을 만듭니다. 브라우저에서 직접 실행하는 실습 코드로 Tailwind CSS Academy을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Tailwind CSS Academy을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Tailwind CSS Academy은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 1번째 강의입니다.

“히어로 및 탐색 섹션” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Tailwind CSS Academy 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Tailwind CSS Academy 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 히어로 및 탐색 섹션
  2. 기능 및 사회적 증거 섹션
  3. 가격표 섹션
  4. 푸터와 반응형 마무리
← Tailwind CSS Academy(으)로 돌아가기