回到顶部按钮 - 材料设计粉彩
一个响应式的 “Back to Top” 按钮组件,遵循 Material Design 原则,采用柔和的配色方案,专为作品集网站量身定制。它包括响应式设计和使用 Tailwind CSS 的深色模式支持。
HTML 代码
<button class="fixed bottom-5 right-5 bg-pink-300 text-white p-3 rounded-full shadow-lg transition-opacity hover:opacity-75 focus:outline-none dark:bg-pink-700 dark:text-gray-200">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 10l7-7m0 0l7 7m-7-7v18" />
</svg>
</button>