组件 目录 目录组件

目录组件

一个为深色模式设计的响应式目录组件,具有带标题的部分以及图像和头像的占位符.

预览

HTML 代码

<div class="bg-gray-900 text-white min-h-screen p-5">
    <h1 class="text-3xl font-bold mb-4">Table of Contents</h1>
    <ul class="space-y-4">
        <li class="bg-gray-800 rounded-lg p-4 shadow hover:shadow-lg transition-shadow duration-200">
            <div class="flex items-center">
                <img src="https://picsum.photos/50" alt="Placeholder Image" class="rounded-full mr-3">
                <h2 class="text-xl font-semibold">Section 1</h2>
            </div>
            <p class="mt-2 text-gray-400">Description for section 1 goes here. It can contain an overview or an introduction.</p>
        </li>
        <li class="bg-gray-800 rounded-lg p-4 shadow hover:shadow-lg transition-shadow duration-200">
            <div class="flex items-center">
                <img src="https://picsum.photos/50" alt="Placeholder Image" class="rounded-full mr-3">
                <h2 class="text-xl font-semibold">Section 2</h2>
            </div>
            <p class="mt-2 text-gray-400">Description for section 2 goes here. It can contain an overview or an introduction.</p>
        </li>
        <li class="bg-gray-800 rounded-lg p-4 shadow hover:shadow-lg transition-shadow duration-200">
            <div class="flex items-center">
                <img src="https://picsum.photos/50" alt="Placeholder Image" class="rounded-full mr-3">
                <h2 class="text-xl font-semibold">Section 3</h2>
            </div>
            <p class="mt-2 text-gray-400">Description for section 3 goes here. It can contain an overview or an introduction.</p>
        </li>
        <li class="bg-gray-800 rounded-lg p-4 shadow hover:shadow-lg transition-shadow duration-200">
            <div class="flex items-center">
                <img src="https://picsum.photos/50" alt="Placeholder Image" class="rounded-full mr-3">
                <h2 class="text-xl font-semibold">Section 4</h2>
            </div>
            <p class="mt-2 text-gray-400">Description for section 4 goes here. It can contain an overview or an introduction.</p>
        </li>
    </ul>
</div>

相关组件

目录组件

响应式 Table of Contents 组件,具有拟物化设计、三元配色方案和深色主题支持,适用于社交媒体界面。没有 JavaScript,只有 HTML 和 Tailwind CSS。

打开

目录组件

一个响应式目录组件,采用尾风CSS样式的拟物化设计,支持黑暗主题,并显示占位符图像和头像。

打开

目录组件

一个简单的目录组件,采用材料设计风格,使用地球色调并支持暗黑模式。适合在博客中消费内容。

打开