랜딩 페이지용 CSS 전용 Tailwind CSS 히어로 섹션입니다. 제목, 설명, CTA가 중앙에 배치된 전체 너비 레이아웃입니다. WCAG AA 액세스 가능하며 Django, HTMX, Laravel, React 및 모든 스택에서 작동합니다.
히어로 구성 요소는 매력적인 시각적 요소와 메시지로 페이지나 제품을 소개하는 눈길을 끄는 전체 너비 섹션을 만듭니다. 시맨틱 HTML과 유연한 레이아웃으로 구축된 히어로 섹션은 사용자 참여의 분위기를 조성합니다. Frutjam Hero 시스템은 다양한 배경, 오버레이 및 반응형 정렬을 지원하므로 랜딩 페이지, 제품 출시 및 눈에 띄는 발표에 이상적입니다.
CSS 전용이며 JavaScript가 필요하지 않습니다. WCAG AA 액세스 가능 및 프레임워크에 구애받지 않음 — Django, HTMX, Laravel, React 및 모든 스택에서 작동합니다.
| 수업 | 유형 | 설명 |
|---|---|---|
| hero | 베이스 | 중앙에 콘텐츠가 있는 전체 너비 섹션 |
| hero-content | 수정자 | Flex 레이아웃이 있는 내부 콘텐츠 영역 |
| hero-overlay | 수정자 | 배경 이미지용 반투명 오버레이 |
기본 사용법
중앙에 텍스트 콘텐츠와 클릭 유도 문구가 포함된 간단한 히어로 섹션을 만듭니다.
1 2 3 4 5 6 7 8 9 | <div class="hero min-h-screen bg-base-200"> <div class="hero-content text-center"> <div class="max-w-md"> <h1 class="text-5xl font-bold">Hello there</h1> <p class="py-6">Introduce your product or service with compelling messaging that resonates with your audience.</p> <button class="btn btn-primary">Get Started</button> </div> </div> </div> |
1 2 3 4 5 6 7 8 9 | <div className="hero min-h-screen bg-base-200"> <div className="hero-content text-center"> <div className="max-w-md"> <h1 className="text-5xl font-bold">Hello there</h1> <p className="py-6">Introduce your product or service with compelling messaging that resonates with your audience.</p> <button className="btn btn-primary">Get Started</button> </div> </div> </div> |
오버레이가 있는 영웅
텍스트 가독성 향상을 위해 배경 이미지가 있는 히어로 섹션에 색상 오버레이를 추가합니다.
1 2 3 4 5 6 7 8 9 10 | <div class="hero min-h-screen bg-base-200"> <div class="hero-overlay bg-opacity-60"></div> <div class="hero-content text-center text-on-neutral"> <div class="max-w-md"> <h1 class="mb-5 text-5xl font-bold">Featured Content</h1> <p class="mb-5">Combine gradient backgrounds with overlay effects for visual depth.</p> <button class="btn btn-primary">Explore</button> </div> </div> </div> |
영웅 레이아웃
다양한 콘텐츠 배열로 반응형 히어로 섹션을 만듭니다.
이미지가 있는 영웅(콘텐츠 + 이미지)
1 2 3 4 5 6 7 8 9 10 11 12 13 | <div class="hero bg-base-200 min-h-screen"> <div class="hero-content flex-col lg:flex-row"> <picture> <source media="(max-width: 640px)" srcset="https://cdn.frutjam.com/images/photo-1.jpg?format=webp&width=320&height=240"> <img src="https://cdn.frutjam.com/images/photo-1.jpg?format=webp&width=480&height=360" alt="Product" class="max-w-sm rounded-lg shadow-2xl" loading="lazy" /> </picture> <div> <h1 class="text-5xl font-bold">Amazing Product</h1> <p class="py-6">Display product images alongside descriptive content for engaging hero sections on larger screens.</p> <button class="btn btn-primary">Learn More</button> </div> </div> </div> |
이미지를 지닌 영웅(역방향)
1 2 3 4 5 6 7 8 9 10 11 12 13 | <div class="hero bg-base-200 min-h-screen"> <div class="hero-content flex-col lg:flex-row-reverse"> <picture> <source media="(max-width: 640px)" srcset="https://cdn.frutjam.com/images/photo-2.jpg?format=webp&width=320&height=240"> <img src="https://cdn.frutjam.com/images/photo-2.jpg?format=webp&width=480&height=360" alt="Showcase" class="max-w-sm rounded-lg shadow-2xl" loading="lazy" /> </picture> <div> <h1 class="text-5xl font-bold">Showcase</h1> <p class="py-6">Reverse layout places image on the right side for alternative visual hierarchy.</p> <button class="btn btn-primary">View Details</button> </div> </div> </div> |
폼을 갖춘 영웅
전환 중심의 랜딩 페이지를 위해 히어로 섹션을 가입 또는 문의 양식과 결합하세요.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <div class="hero bg-base-200 min-h-screen"> <div class="hero-content flex-col lg:flex-row-reverse"> <div class="text-center lg:text-left max-w-md"> <h1 class="text-5xl font-bold">Subscribe Now</h1> <p class="py-6">Join our community and get updates on the latest features and news.</p> </div> <div class="card bg-base-100 shadow-xl shrink-0 w-full max-w-sm"> <div class="card-content"> <h2 class="card-title">Get Started</h2> <input type="email" placeholder="Enter your email" class="input input-outline w-full mb-4"> <button class="btn btn-primary w-full">Subscribe</button> </div> </div> </div> </div> |
영웅 반응형 스태킹
히어로 섹션은 모바일에서 자동으로 쌓이고 더 큰 화면에서는 가로로 정렬됩니다.
1 2 3 4 5 6 7 8 9 10 | <div class="hero bg-base-200 min-h-screen"> <div class="hero-content flex-col"> <div class="text-center max-w-lg"> <h1 class="text-4xl md:text-5xl font-bold">Responsive Hero</h1> <p class="py-6">This layout automatically adapts to different screen sizes for optimal viewing on all devices.</p> <button class="btn btn-primary">Get Started</button> <button class="btn btn-ghost">Learn More</button> </div> </div> </div> |
Claude Code, Cursor 또는 다른 AI 편집기를 사용하시나요?
Cherry MCP는 AI 편집기에 요청 시 정확한 영웅 클래스 이름과 구조를 제공합니다. 더 이상 환각에 빠진 수업은 없습니다.