Content Link Component(콘텐츠 링크 구성 요소)로 건너뛰기
기본 콘텐츠로 건너뛸 수 있는 링크를 제공하는 웹 구성요소로, 파스텔 색조 구성표로 머티리얼 디자인 스타일로 전자상거래 웹사이트에 적합합니다. 어두운 테마를 지원하는 반응형 디자인이 특징입니다.
HTML 코드
<nav class="bg-pastel-200 dark:bg-gray-800 shadow-lg p-4 rounded-lg">
<div class="flex justify-between items-center">
<a href="#main-content" class="text-pastel-800 dark:text-white font-medium text-lg hover:text-pastel-600 dark:hover:text-gray-300 transition duration-300 ease-in-out">
Skip to Content
</a>
</div>
</nav>
<main id="main-content" class="max-w-7xl mx-auto p-6 bg-white dark:bg-gray-900 rounded-lg shadow-md mt-4">
<h1 class="text-2xl font-bold text-gray-800 dark:text-white">Welcome to Our E-commerce Store</h1>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mt-4">
<div class="bg-pastel-300 dark:bg-gray-700 p-4 rounded-lg shadow-md transition-transform transform hover:scale-105">
<img src="https://picsum.photos/200/300?random=1" alt="Product 1" class="w-full h-48 object-cover rounded-lg">
<h2 class="mt-2 text-xl text-gray-800 dark:text-white">Product 1</h2>
<p class="text-gray-600 dark:text-gray-300">Description of the product goes here.</p>
<button class="mt-2 w-full bg-pastel-500 dark:bg-gray-600 text-gray-800 dark:text-white font-semibold py-2 rounded-lg hover:bg-pastel-600 dark:hover:bg-gray-500 transition duration-300 ease-in-out">Add to Cart</button>
</div>
<div class="bg-pastel-300 dark:bg-gray-700 p-4 rounded-lg shadow-md transition-transform transform hover:scale-105">
<img src="https://picsum.photos/200/300?random=2" alt="Product 2" class="w-full h-48 object-cover rounded-lg">
<h2 class="mt-2 text-xl text-gray-800 dark:text-white">Product 2</h2>
<p class="text-gray-600 dark:text-gray-300">Description of the product goes here.</p>
<button class="mt-2 w-full bg-pastel-500 dark:bg-gray-600 text-gray-800 dark:text-white font-semibold py-2 rounded-lg hover:bg-pastel-600 dark:hover:bg-gray-500 transition duration-300 ease-in-out">Add to Cart</button>
</div>
<div class="bg-pastel-300 dark:bg-gray-700 p-4 rounded-lg shadow-md transition-transform transform hover:scale-105">
<img src="https://picsum.photos/200/300?random=3" alt="Product 3" class="w-full h-48 object-cover rounded-lg">
<h2 class="mt-2 text-xl text-gray-800 dark:text-white">Product 3</h2>
<p class="text-gray-600 dark:text-gray-300">Description of the product goes here.</p>
<button class="mt-2 w-full bg-pastel-500 dark:bg-gray-600 text-gray-800 dark:text-white font-semibold py-2 rounded-lg hover:bg-pastel-600 dark:hover:bg-gray-500 transition duration-300 ease-in-out">Add to Cart</button>
</div>
</div>
</main>
관련 구성 요소
Content Link Component(콘텐츠 링크 구성 요소)로 건너뛰기
Glassmorphism JavaScript 없이 Tailwind CSS를 사용하여 젖빛 유리 효과, 흐림, 응답성 및 다크 모드 지원을 특징으로 하는 콘텐츠 링크로 건너뜁니다.