组件 3D卡片组件

3D卡片组件

一个具有3D设计风格、鲜艳色彩和多个互动元素的响应式卡片组件,适用于仪表板。它支持使用Tailwind的深色前缀的黑暗模式。

预览

HTML 代码

<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 p-6">
    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg transform transition-transform hover:scale-105">
        <div class="relative">
            <img src="https://picsum.photos/400/200" alt="Card image" class="rounded-t-lg w-full">
            <div class="absolute top-2 left-2 bg-red-600 text-white py-1 px-2 rounded-md">New</div>
        </div>
        <div class="p-4">
            <h2 class="text-xl font-bold text-gray-800 dark:text-white">Card Title</h2>
            <p class="text-gray-600 dark:text-gray-300 mt-2">This is a description of the card content. It provides insight into the purpose of this card.</p>
            <div class="flex items-center mt-4">
                <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User avatar" class="w-10 h-10 rounded-full">
                <span class="ml-2 text-gray-700 dark:text-gray-300">John Doe</span>
            </div>
        </div>
        <div class="px-4 py-2 border-t dark:border-gray-700">
            <button class="bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 focus:outline-none">Action</button>
        </div>
    </div>
    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg transform transition-transform hover:scale-105">
        <div class="relative">
            <img src="https://picsum.photos/400/201" alt="Card image" class="rounded-t-lg w-full">
            <div class="absolute top-2 left-2 bg-green-600 text-white py-1 px-2 rounded-md">Featured</div>
        </div>
        <div class="p-4">
            <h2 class="text-xl font-bold text-gray-800 dark:text-white">Card Title</h2>
            <p class="text-gray-600 dark:text-gray-300 mt-2">Insightful content about the card, detailing its functionalities and offerings.</p>
            <div class="flex items-center mt-4">
                <img src="https://randomuser.me/api/portraits/women/1.jpg" alt="User avatar" class="w-10 h-10 rounded-full">
                <span class="ml-2 text-gray-700 dark:text-gray-300">Jane Smith</span>
            </div>
        </div>
        <div class="px-4 py-2 border-t dark:border-gray-700">
            <button class="bg-orange-600 text-white py-2 px-4 rounded-md hover:bg-orange-700 focus:outline-none">Explore</button>
        </div>
    </div>
    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg transform transition-transform hover:scale-105">
        <div class="relative">
            <img src="https://picsum.photos/400/202" alt="Card image" class="rounded-t-lg w-full">
            <div class="absolute top-2 left-2 bg-blue-600 text-white py-1 px-2 rounded-md">Popular</div>
        </div>
        <div class="p-4">
            <h2 class="text-xl font-bold text-gray-800 dark:text-white">Card Title</h2>
            <p class="text-gray-600 dark:text-gray-300 mt-2">Information and interactive elements that are engaging and useful.</p>
            <div class="flex items-center mt-4">
                <img src="https://randomuser.me/api/portraits/men/2.jpg" alt="User avatar" class="w-10 h-10 rounded-full">
                <span class="ml-2 text-gray-700 dark:text-gray-300">Mark Johnson</span>
            </div>
        </div>
        <div class="px-4 py-2 border-t dark:border-gray-700">
            <button class="bg-purple-600 text-white py-2 px-4 rounded-md hover:bg-purple-700 focus:outline-none">Learn More</button>
        </div>
    </div>
</div>

相关组件

黑暗模式卡片组件

一个为商业/企业网站设计的响应式卡片组件,具有深色模式用户界面和灰度配色方案,呈现适中复杂度和交互性。

打开

类拟物卡片组件

响应式拟物风格卡片组件,支持暗模式,使用Tailwind CSS。包含占位图像和头像。

打开

卡片组件

一个为暗模式设计的复杂卡片组件,适合博客和内容消费,具有三元色彩方案。

打开