组件 360° 查看器 360° 查看组件

360° 查看组件

一个以3D风格设计的响应式360°查看组件,支持暗主题,使用来自picsum.photos的占位符图像。

预览

HTML 代码

<div class="flex flex-col items-center justify-center bg-gray-800 p-6 rounded-lg shadow-lg md:flex-row md:space-x-8">
    <div class="w-full md:w-1/2 transform perspective-1000">
        <div class="relative w-full h-64 rounded overflow-hidden shadow-2xl">
            <img src="https://picsum.photos/500/400/?random" alt="360 view" class="absolute inset-0 w-full h-full object-cover transition-transform duration-700 ease-in-out hover:rotate-y-360" />
        </div>
    </div>
    <div class="flex flex-col justify-center mt-4 md:mt-0">
        <h2 class="text-white text-xl font-bold mb-2">Explore the 360° View</h2>
        <p class="text-gray-400">Experience an immersive 3D view of the product. Move your cursor around to get a complete view.</p>
        <div class="mt-4">
            <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-12 h-12 rounded-full border-2 border-gray-600" />
            <p class="text-white text-sm">Uploaded by John Doe</p>
        </div>
    </div>
</div>
<style>
    @tailwind base;
    @tailwind components;
    @tailwind utilities;

    /* Dark Mode Styles */
    @media (prefers-color-scheme: dark) {
        .bg-gray-800 { background-color: #2d3748; }
        .text-gray-400 { color: #cbd5e0; }
        .border-gray-600 { border-color: #4a5568; }
    }

    /* 360° Rotation Effect */
    @keyframes rotate {
        from { transform: rotateY(0deg); }
        to { transform: rotateY(360deg); }
    }

    .hover\:rotate-y-360:hover {
        animation: rotate 2s infinite;
    }
</style>

相关组件

360° 观看器组件

专为电子商务设计的响应式 360 度查看器组件,支持深色模式。造型为复古/复古,采用柔和的配色方案。仅使用 HTML 和 Tailwind CSS。

打开

复古360度查看器

复古的 360° 查看组件,具有响应效果和使用 Tailwind CSS 的暗主题支持。使用来自 picsum.photos 的占位符图像。

打开

360° 查看器组件

受 Material Design 启发的 360° 查看器组件,具有鲜艳的色彩,用于展示作品或产品,具有响应式设计和深色模式支持。

打开