返回顶部按钮

具有微交互、大地色调配色方案、商业/公司网站简单布局的 Back to Top 按钮组件;使用 Tailwind CSS 支持深色模式的响应式设计

预览

HTML 代码

<!-- Back to Top Button Component -->
<a href="#top" class="fixed bottom-6 right-6 flex items-center justify-center w-12 h-12 bg-emerald-700 text-white rounded-full shadow-lg transform transition-transform duration-200 hover:scale-110 hover:bg-emerald-600 dark:bg-emerald-600 dark:hover:bg-emerald-500" aria-label="Back to Top">
  <span class="sr-only">Back to Top</span>
  <svg class="w-6 h-6" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" aria-hidden="true">
    <path stroke-linecap="round" stroke-linejoin="round" d="M5 15l7-7 7 7"/>
  </svg>
</a>

<!-- To enable smooth scrolling behavior across the page, add the `scroll-smooth` class to your `<html>` element: -->
<!-- <html class="scroll-smooth"> -->

相关组件

回到顶部按钮

一个响应式返回顶部按钮组件,采用玻璃拟态效果,适用于专业的企业网站。它具有简单的布局和最少的元素,适用于浅色和深色主题。

打开

Back to Top Button 组件

响应式“Back to Top”按钮组件,具有受纸张/印刷启发的设计、三重配色方案和复杂的视觉元素,适用于电子商务网站。包括深色模式支持。

打开

Brutalism_Earth_Tone_Back_To_Top_Button

一个受野兽派启发的“Back to Top”按钮,带有大地色调,专为博客/内容网站设计。它复杂度适中,响应迅速,并支持深色模式。纽扣采用高对比度设计和略显粗糙的美感。

打开