组件 添加到购物车按钮 添加到购物车按钮

添加到购物车按钮

一个采用材料设计原则、使用 Tailwind CSS 样式的响应式添加到购物车按钮,支持暗模式主题。

预览

HTML 代码

<div class="flex items-center justify-center h-screen bg-gray-100 dark:bg-gray-800 transition-colors duration-300">
  <div class="bg-white dark:bg-gray-900 shadow-lg rounded-lg px-5 py-4 transition-transform duration-300 hover:scale-105">
    <img src="https://picsum.photos/200/200" alt="Product Image" class="w-full h-40 object-cover rounded-md mb-4">
    <h2 class="text-lg font-semibold dark:text-white">Product Name</h2>
    <p class="text-gray-700 dark:text-gray-300 mb-4">This is a brief description of the product.</p>
    <div class="flex items-center justify-between">
      <span class="text-xl font-bold dark:text-white">$19.99</span>
      <button class="bg-blue-600 text-white rounded-md px-4 py-2 transition-colors duration-300 hover:bg-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 dark:bg-blue-700 dark:hover:bg-blue-600">
        Add to Cart
      </button>
    </div>
  </div>
</div>

相关组件

加入购物车按钮

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

打开

加入购物车按钮

具有极简/平面设计、灰度色彩方案、复杂复杂程度的购物车按钮组件,适用于仪表板,具有响应式设计和黑暗主题支持。

打开

添加到购物车按钮组件

响应式 Add to Cart Button 组件,采用粗野主义风格设计,色彩鲜艳,适用于支持深色主题的社交媒体界面。

打开