返回顶部按钮 - 3D设计
带有3D设计、响应效果和深色主题支持的返回顶部按钮,使用Tailwind CSS。不包含JavaScript。
HTML 代码
<div class="fixed bottom-4 right-4 group">
<button class="bg-blue-600 text-white px-4 py-2 rounded-lg shadow-lg
transform transition-transform duration-300
group-hover:scale-110 group-active:scale-90
dark:bg-blue-800 dark:shadow-xl dark:group-hover:scale-110 dark:group-active:scale-90
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">
<svg class="h-6 w-6" 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>
</button>
</div>