组件 购物车 购物车组件

购物车组件

一个简单的响应式购物车组件,采用复古设计、互补色配色方案,并支持黑暗模式,使用Tailwind CSS构建。

预览

HTML 代码

<div class="container mx-auto p-4">
  <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
    <h2 class="text-xl font-bold text-gray-800 dark:text-white mb-4">Shopping Cart</h2>
    <div class="space-y-4">
      <!-- Cart Item -->
      <div class="flex justify-between items-center border-b pb-4 border-gray-200 dark:border-gray-700">
        <div class="flex items-center">
          <img class="w-16 h-16 object-cover rounded mr-4 filter sepia" src="https://picsum.photos/seed/retro1/100/100" alt="Product Image">
          <div>
            <h3 class="text-gray-800 dark:text-white font-medium">Retro T-Shirt</h3>
            <p class="text-gray-600 dark:text-gray-300 text-sm">Size: L</p>
          </div>
        </div>
        <div class="text-gray-700 dark:text-gray-200 font-semibold">$29.99</div>
      </div>
      <!-- Cart Item -->
      <div class="flex justify-between items-center border-b pb-4 border-gray-200 dark:border-gray-700">
        <div class="flex items-center">
          <img class="w-16 h-16 object-cover rounded mr-4 filter sepia" src="https://picsum.photos/seed/retro2/100/100" alt="Product Image">
          <div>
            <h3 class="text-gray-800 dark:text-white font-medium">Vintage Jeans</h3>
            <p class="text-gray-600 dark:text-gray-300 text-sm">Size: 32</p>
          </div>
        </div>
        <div class="text-gray-700 dark:text-gray-200 font-semibold">$59.99</div>
      </div>
    </div>
    <div class="flex justify-between items-center mt-6">
      <div class="text-xl font-bold text-gray-800 dark:text-white">Total:</div>
      <div class="text-xl font-bold text-gray-800 dark:text-white">$89.98</div>
    </div>
    <button class="mt-6 w-full bg-rose-500 hover:bg-rose-600 text-white font-bold py-2 px-4 rounded dark:bg-teal-500 dark:hover:bg-teal-600 filter sepia">Checkout</button>
  </div>
</div>

相关组件

购物车组件

一个采用拟物化设计的购物车组件。它包含模拟现实世界元素的数字元素,完全响应支持,并兼容暗主题。

打开

3D 购物车组件

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

打开

购物车组件

一个设计有玻璃态效果的购物车组件,采用互补色调,并为暗模式进行了优化。非常适合用于投资组合展示作品或产品。

打开