添加到购物车 Glassmorphism 大地色调按钮
一个简单的“添加到购物车”按钮,采用玻璃形态风格设计,使用大地色调,适用于以天气/气候为主题的应用。它是完全响应的,并支持深色模式。
HTML 代码
<div class="flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-900 p-4">
<button class="relative overflow-hidden w-64 h-16 rounded-full shadow-lg backdrop-filter backdrop-blur-lg bg-white bg-opacity-20 border border-t-white border-l-white border-opacity-30
dark:bg-gray-800 dark:bg-opacity-20 dark:border-white dark:border-opacity-10
group transition-all duration-300 ease-in-out
hover:shadow-xl hover:bg-opacity-30 hover:border-opacity-40
dark:hover:bg-opacity-30 dark:hover:border-opacity-20">
<span class="absolute inset-0 bg-gradient-to-br from-green-700 to-green-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300 ease-in-out rounded-full"></span>
<span class="relative z-10 flex items-center justify-center text-lg font-semibold text-gray-800 dark:text-gray-200 transition-colors duration-300 ease-in-out group-hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z" />
</svg>
Add to Cart
</span>
</button>
</div>
相关组件
Organic_Nature_Add_To_Cart_Button
一个有机/自然风格的“添加到购物车”按钮组件,具有互补的配色方案,适用于教育平台。具有流畅的线条、微妙的交互元素、完全响应能力和深色模式支持。
添加到购物车按钮组件 - Memphis 灰度天气
一个复杂的“添加到购物车”按钮组件,具有 Memphis 设计灵感,使用灰度配色方案,适用于天气/气候产品。功能包括动态图标、加载状态、脉冲动画和项目计数,所有这些都是响应式的,并支持深色模式。此组件旨在为天气数据订阅或气候相关产品提供有趣而实用的行动号召。