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

Back to Top Button 组件

响应式返回顶部按钮组件,采用 Glassmorphism 设计、大地色调配色方案和复杂的交互,适用于仪表板。

预览

HTML 代码

<div class="fixed bottom-6 right-6">
  <a href="#top" class="group block">
    <button class="relative flex items-center justify-center w-16 h-16 bg-white dark:bg-gray-800 bg-opacity-20 dark:bg-opacity-20 backdrop-filter backdrop-blur-lg rounded-full shadow-lg transition-all duration-300 ease-in-out hover:scale-110 focus:outline-none focus:ring-4 focus:ring-teal-500 dark:focus:ring-teal-400 focus:ring-opacity-70">
      <svg class="w-8 h-8 text-gray-800 dark:text-gray-200 transform transition-transform duration-300 ease-in-out group-hover:-translate-y-1" 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>
      <span class="absolute top-1/2 left-1/2 -translate-x-1/2 translate-y-full opacity-0 group-hover:opacity-100 group-hover:translate-y-1/2 px-3 py-1 bg-gray-800 dark:bg-gray-200 text-white dark:text-gray-800 text-sm font-semibold rounded-md whitespace-nowrap transition-all duration-300 ease-in-out">
        Back to Top
      </span>
    </button>
  </a>
</div>

<div class="min-h-screen bg-gradient-to-br from-stone-100 via-stone-200 to-stone-300 dark:from-stone-800 dark:via-stone-900 dark:to-black flex flex-col items-center justify-center p-8">
  <h1 id="top" class="text-5xl font-extrabold text-gray-900 dark:text-white mb-8 text-center">Dashboard Overview</h1>
  <p class="text-lg text-gray-700 dark:text-gray-300 max-w-2xl text-center mb-12">
    Scroll down to see the 

相关组件

返回顶部按钮组件

一个响应式返回顶部按钮,设计有微交互和鲜艳的色彩,适用于支持深色模式的仪表板界面。

打开

Back to Top Button 组件

用于仪表板的极简主义扁平 Back to Top Button Component,采用单色配色方案。它中等复杂度,具有交互功能、响应式设计和深色主题支持,完全使用 HTML 和 Tailwind CSS 构建。

打开

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

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

打开