组件 Back to Top 按钮 Back to Top Button 组件

Back to Top Button 组件

用于 CRM/业务工具的“返回顶部”按钮,采用包豪斯风格设计,具有高对比度色彩,具有几何形状和适用于所有屏幕尺寸的响应能力,包括暗模式支持。

预览

HTML 代码

<div class="fixed bottom-4 right-4 z-50">
  <!-- Outer square container for Bauhaus aesthetic -->
  <a href="#" class="group block w-14 h-14 md:w-16 md:h-16 lg:w-20 lg:h-20 bg-blue-600 dark:bg-yellow-400 p-1 md:p-2 lg:p-3 relative overflow-hidden transition-all duration-300 ease-in-out hover:scale-110 active:scale-95 shadow-lg dark:shadow-yellow-800/50">
    <!-- Inner square acts as a focus element, rotates on hover -->
    <div class="w-full h-full bg-red-600 dark:bg-black flex items-center justify-center transform transition-transform duration-300 ease-in-out group-hover:rotate-45">
      <!-- Arrow Icon - Simple geometric shapes -->
      <svg class="w-8 h-8 md:w-10 md:h-10 text-white dark:text-blue-600 transform -rotate-90 group-hover:scale-125 transition-transform duration-300 ease-in-out" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 10l7-7m0 0l7 7m-7-7v18"></path>
      </svg>
    </div>
    <span class="sr-only">Back to Top</span>
  </a>
</div>

相关组件

Back to Top Button 组件

适用于电子商务网站的响应式“Back to Top”按钮组件,采用黑白单色设计,具有明亮的强调色,并在悬停时提供引人入胜的微交互。包括深色模式支持。

打开

拟物化返回顶部按钮

一个拟物化的“Back to Top”按钮,专为商业/公司网站设计,采用温暖的中性色,具有响应式设计和深色模式支持。该按钮具有 3D 按下效果。

打开

回到顶部按钮 - 材料设计粉彩

一个响应式的 “Back to Top” 按钮组件,遵循 Material Design 原则,采用柔和的配色方案,专为作品集网站量身定制。它包括响应式设计和使用 Tailwind CSS 的深色模式支持。

打开