Table of Contents 구성 요소
머티리얼 디자인에서 생생한 색상으로 스타일링된 반응형 목차 구성요소로, 다크 모드 지원 및 여러 대화형 요소를 포함하여 블로그 및 콘텐츠 소비에 적합합니다.
HTML 코드
<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-lg">
<h2 class="text-2xl font-bold text-gray-800 dark:text-white mb-4">Table of Contents</h2>
<ul class="space-y-3">
<li class="hover:bg-gray-100 dark:hover:bg-gray-700 rounded p-2 transition duration-200">
<a href="#section1" class="flex items-center text-gray-600 dark:text-gray-200">
<img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-3">
<span class="font-medium">Section 1: Introduction</span>
</a>
</li>
<li class="hover:bg-gray-100 dark:hover:bg-gray-700 rounded p-2 transition duration-200">
<a href="#section2" class="flex items-center text-gray-600 dark:text-gray-200">
<img src="https://randomuser.me/api/portraits/women/2.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-3">
<span class="font-medium">Section 2: Features</span>
</a>
</li>
<li class="hover:bg-gray-100 dark:hover:bg-gray-700 rounded p-2 transition duration-200">
<a href="#section3" class="flex items-center text-gray-600 dark:text-gray-200">
<img src="https://randomuser.me/api/portraits/men/3.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-3">
<span class="font-medium">Section 3: Implementation</span>
</a>
</li>
<li class="hover:bg-gray-100 dark:hover:bg-gray-700 rounded p-2 transition duration-200">
<a href="#section4" class="flex items-center text-gray-600 dark:text-gray-200">
<img src="https://randomuser.me/api/portraits/women/4.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-3">
<span class="font-medium">Section 4: Conclusion</span>
</a>
</li>
</ul>
<div class="mt-6">
<h3 class="text-xl font-semibold text-gray-800 dark:text-white">Images</h3>
<div class="grid grid-cols-2 gap-4 mt-2">
<img src="https://picsum.photos/200/150?random=1" alt="Random Image 1" class="rounded-lg shadow">
<img src="https://picsum.photos/200/150?random=2" alt="Random Image 2" class="rounded-lg shadow">
<img src="https://picsum.photos/200/150?random=3" alt="Random Image 3" class="rounded-lg shadow">
<img src="https://picsum.photos/200/150?random=4" alt="Random Image 4" class="rounded-lg shadow">
</div>
</div>
</div>
관련 구성 요소
Table of Contents 구성 요소
머티리얼 디자인 스타일로 디자인된 반응형 목차 구성 요소로, 비즈니스/기업 웹 사이트에 대한 흙색 및 어두운 테마 지원이 있습니다.
Table of Contents 구성 요소
Tailwind CSS를 사용하여 머티리얼 디자인 원칙에 따라 스타일링된 반응형 목차 구성요소로, 다크 모드를 지원하고 자리표시자 이미지와 아바타를 제공합니다.