组件 网格布局 网格布局组件

网格布局组件

一个具有复古/老式设计的响应式网格布局组件,具有怀旧的80年代/90年代美学。该组件包含占位符图像和头像,并支持暗模式。

预览

HTML 代码

<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-6 bg-gray-100 dark:bg-gray-800">
    <div class="bg-white dark:bg-gray-900 shadow-lg rounded-lg overflow-hidden">
        <img src="https://picsum.photos/300/200?random=1" alt="Placeholder Image 1" class="w-full h-36 object-cover">
        <div class="p-4">
            <h2 class="text-xl font-bold text-gray-800 dark:text-gray-200">Retro 1</h2>
            <p class="text-gray-600 dark:text-gray-400">This is a retro-themed description for the first item in the grid.</p>
            <div class="flex items-center mt-2">
                <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-2">
                <span class="text-sm text-gray-700 dark:text-gray-300">User 1</span>
            </div>
        </div>
    </div>
    <div class="bg-white dark:bg-gray-900 shadow-lg rounded-lg overflow-hidden">
        <img src="https://picsum.photos/300/200?random=2" alt="Placeholder Image 2" class="w-full h-36 object-cover">
        <div class="p-4">
            <h2 class="text-xl font-bold text-gray-800 dark:text-gray-200">Retro 2</h2>
            <p class="text-gray-600 dark:text-gray-400">This is a retro-themed description for the second item in the grid.</p>
            <div class="flex items-center mt-2">
                <img src="https://randomuser.me/api/portraits/women/1.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-2">
                <span class="text-sm text-gray-700 dark:text-gray-300">User 2</span>
            </div>
        </div>
    </div>
    <div class="bg-white dark:bg-gray-900 shadow-lg rounded-lg overflow-hidden">
        <img src="https://picsum.photos/300/200?random=3" alt="Placeholder Image 3" class="w-full h-36 object-cover">
        <div class="p-4">
            <h2 class="text-xl font-bold text-gray-800 dark:text-gray-200">Retro 3</h2>
            <p class="text-gray-600 dark:text-gray-400">This is a retro-themed description for the third item in the grid.</p>
            <div class="flex items-center mt-2">
                <img src="https://randomuser.me/api/portraits/men/2.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-2">
                <span class="text-sm text-gray-700 dark:text-gray-300">User 3</span>
            </div>
        </div>
    </div>
    <div class="bg-white dark:bg-gray-900 shadow-lg rounded-lg overflow-hidden">
        <img src="https://picsum.photos/300/200?random=4" alt="Placeholder Image 4" class="w-full h-36 object-cover">
        <div class="p-4">
            <h2 class="text-xl font-bold text-gray-800 dark:text-gray-200">Retro 4</h2>
            <p class="text-gray-600 dark:text-gray-400">This is a retro-themed description for the fourth item in the grid.</p>
            <div class="flex items-center mt-2">
                <img src="https://randomuser.me/api/portraits/women/2.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-2">
                <span class="text-sm text-gray-700 dark:text-gray-300">User 4</span>
            </div>
        </div>
    </div>
</div>

相关组件

复古/怀旧电子商务网格布局

一个响应式、支持深色主题的网格布局组件,具有复古/怀旧和淡色设计,旨在用于电子商务产品展示。使用Tailwind CSS,并包括模拟图片和头像。

打开

网格布局组件

一个为社交媒体界面设计的响应式网格布局组件,采用拟物风格,具有三元色彩、多个交互元素和深色主题支持。

打开

材料设计网格布局

一个响应式网格布局组件,具有材料设计风格,包括阴影效果和深色模式支持。

打开