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

加入购物车按钮组件

一个复古/怀旧风格的“添加到购物车”按钮组件,适用于电子商务应用。这款按钮的设计灵感来自80年代和90年代,使用了相似的色彩方案,并具有互动效果。它是响应式的,支持深色主题。

预览

HTML 代码

<div class="flex flex-col items-center">
    <div class="bg-gradient-to-r from-purple-500 to-pink-500 p-6 rounded-lg shadow-lg transform transition-all duration-300 hover:scale-105 dark:from-purple-700 dark:to-pink-700">
        <img src="https://picsum.photos/200/100" alt="Product Image" class="w-full h-auto rounded-t-lg" />
        <div class="mt-2 flex flex-col items-center">
            <p class="text-white text-lg font-bold dark:text-gray-300">Cool Retro Product</p>
            <span class="text-yellow-200 dark:text-yellow-300">$19.99</span>
            <button class="mt-4 bg-yellow-400 text-white py-2 px-4 rounded-full transition duration-300 hover:bg-yellow-500 dark:bg-yellow-600 dark:hover:bg-yellow-700">
                <span class="flex items-center justify-center">
                    <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-6 h-6 rounded-full mr-2" />
                    Add to Cart
                </span>
            </button>
        </div>
    </div>
</div>

相关组件

添加到购物车按钮

一个使用Tailwind CSS设计的拟物化“添加到购物车”按钮组件,具有响应式效果和暗黑主题支持。

打开

添加到购物车按钮

一个响应式的添加到购物车按钮组件,采用拟物化元素,生动的色彩,并支持深色主题,适合博客和内容消费目的。

打开

添加到购物车按钮

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

打开