组件 购物车 购物车组件

购物车组件

一个使用 Tailwind CSS 设计的 3D 购物车组件,具备响应式效果和深色主题支持。

预览

HTML 代码

<div class='bg-white dark:bg-gray-800 shadow-lg rounded-lg p-6 max-w-md mx-auto transform transition-all duration-300 hover:scale-105'>
    <h2 class='text-xl font-semibold text-gray-800 dark:text-white'>Shopping Cart</h2>
    <ul class='mt-4 space-y-4'>
        <li class='flex items-center justify-between p-4 bg-gray-100 dark:bg-gray-700 rounded-md shadow-md'>
            <img src='https://picsum.photos/50/50' alt='Product Image' class='rounded-lg'>
            <div class='flex-grow pl-4'>
                <h3 class='text-gray-800 dark:text-white font-medium'>Product Name</h3>
                <p class='text-gray-600 dark:text-gray-300'>$19.99</p>
            </div>
            <button class='bg-red-500 text-white px-3 py-1 rounded-md hover:bg-red-600 transition'>Remove</button>
        </li>
        <li class='flex items-center justify-between p-4 bg-gray-100 dark:bg-gray-700 rounded-md shadow-md'>
            <img src='https://picsum.photos/50/50' alt='Product Image' class='rounded-lg'>
            <div class='flex-grow pl-4'>
                <h3 class='text-gray-800 dark:text-white font-medium'>Another Product</h3>
                <p class='text-gray-600 dark:text-gray-300'>$29.99</p>
            </div>
            <button class='bg-red-500 text-white px-3 py-1 rounded-md hover:bg-red-600 transition'>Remove</button>
        </li>
    </ul>
    <div class='mt-6 flex justify-between items-center'>
        <span class='text-gray-800 dark:text-white text-lg'>Total:</span>
        <span class='text-gray-800 dark:text-white text-lg font-semibold'>$49.98</span>
    </div>
    <button class='mt-5 w-full bg-blue-500 text-white py-2 rounded-md hover:bg-blue-600 transition'>Proceed to Checkout</button>
</div>

相关组件

3D 购物车组件

一个具有视觉冲击力的购物车组件,具有 3D 设计元素,可创造深度和参与度。使用三色配色方案(原色蓝、鲜艳的红色和琥珀色黄色)来增加视觉趣味。这个复杂的界面包括带有图像的产品列表、数量控制、价格摘要和模拟 3D 运动的悬停效果。完全响应,支持深色主题。该组件专为内容/博客环境而设计,读者可能会在其中购买推荐产品,同时使用内容。

打开

购物车组件

一种响应式购物车组件,采用拟物化设计,支持黑暗主题,并提供随机占位符图像。

打开

购物车组件

一个简单的响应式购物车组件,采用新拟态设计,为深色主题提供互补的配色方案。

打开