组件 图像灯箱 图片灯箱组件

图片灯箱组件

一个拟物化的图片灯箱组件,旨在模仿现实中的对应物,具备响应式效果和使用Tailwind CSS的深色主题支持。

预览

HTML 代码

<div class="flex flex-col items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-900">
    <div class="relative group w-full max-w-2xl bg-white dark:bg-gray-800 shadow-lg rounded-lg overflow-hidden">
        <img src="https://picsum.photos/600/400" alt="Lightbox Image" class="w-full h-auto rounded-lg transition ease-in-out duration-300 transform group-hover:scale-105" />
        <div class="absolute inset-0 bg-black opacity-0 group-hover:opacity-50 transition-opacity duration-300 rounded-lg"></div>
        <div class="absolute bottom-0 left-0 right-0 p-4 text-white">
            <h2 class="font-bold text-lg">Image Title</h2>
            <p class="text-sm">Image description goes here.</p>
        </div>
    </div>

    <div class="mt-4">
        <button class="p-2 px-4 bg-blue-600 text-white rounded hover:bg-blue-500 dark:bg-blue-700 dark:hover:bg-blue-600 shadow-lg">
            <span class="flex items-center">
                <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-6 h-6 rounded-full mr-2" />
                View User's Images
            </span>
        </button>
    </div>
</div>

相关组件

图像灯箱组件

一个为电子商务设计的响应式图片灯箱组件,具有暗模式支持和大地色调的色彩方案。

打开

Image Lightbox 组件

支持深色模式的响应式图像灯箱组件。此组件会显示一个图像库,单击图像会打开一个全屏模式,其中包含导航箭头以浏览图像。它具有关闭按钮,并使用鲜艳的色彩来突出交互式元素。该设计专为商业/企业环境量身定制,确保专业而引人入胜的用户体验。

打开

图片灯箱组件

一个使用 Tailwind CSS 设计的响应式图片灯箱组件,采用玻璃风格设计。该组件支持深色主题,具有类似雾面玻璃的半透明元素和模糊效果。

打开