组件 媒体嵌入 媒体嵌入组件

媒体嵌入组件

一个简单的、响应式的媒体嵌入组件,采用灰度3D设计和暗模式支持,适合商业网站。使用 Tailwind CSS 进行样式设计。

预览

HTML 代码

<div class="relative flex items-center justify-center h-96 overflow-hidden bg-gray-100 dark:bg-gray-900 rounded-lg shadow-lg m-4">

  <!-- 3D effect background elements (simplified) -->
  <div class="absolute inset-0 z-0 pointer-events-none transform scale-150">
    <div class="absolute inset-0 bg-gradient-to-br from-gray-300 via-gray-100 to-gray-300 dark:from-gray-700 dark:via-gray-900 dark:to-gray-700 opacity-50"></div>
    <div class="absolute inset-0 border-4 border-gray-200 dark:border-gray-800 rounded-lg transform rotate-3"></div>
  </div>

  <!-- Content area -->
  <div class="relative z-10 p-8 bg-white dark:bg-gray-800 bg-opacity-90 dark:bg-opacity-90 rounded-lg shadow-xl max-w-md text-center">
    <h2 class="text-2xl font-bold text-gray-800 dark:text-white mb-4">Embed Media</h2>
    
    <!-- Placeholder for embedded media (e.g., iframe for YouTube,- Vimeo) -->
    <!-- Replace with actual embed code -->
    <div class="w-full aspect-video bg-gray-200 dark:bg-gray-700 rounded-md flex items-center justify-center text-gray-500 dark:text-gray-400">
      <p>Media Placeholder</p>
    </div>

    <p class="mt-4 text-gray-600 dark:text-gray-300 text-sm">Embed your videos, maps, or other media here.</p>

  </div>

</div>

相关组件

Retro Media 嵌入组件

具有“复古/复古”设计的响应式媒体嵌入组件,灵感来自 80 年代/90 年代的美学,如旧 CRT 显示器和 VCR 播放器。它在石板灰色底色上使用蓝绿色和橙色的互补配色方案,适用于“商业/公司”网站。该组件具有中等复杂度,在播放按钮和媒体缩略图上具有悬停效果、仿 REC 灯光动画和装饰性非功能性控制元素。它包括使用 Tailwind 的 'dark:' 前缀的深色主题支持。媒体区域设计为 16:9 纵横比(需要 Tailwind 纵横比插件或 CSS 回退,如 padding-bottom 技巧)。使用 picsum.photos 中的占位符图像。

打开

媒体嵌入组件

具备玻璃摩尔风格、类似色彩方案和支持深色模式的响应式媒体嵌入组件,适合内容消费。

打开

媒体嵌入组件

一个响应式媒体嵌入组件,具有玻璃摩尔主义设计、土壤色调和暗模式支持,使用Tailwind CSS构建,适用于社交媒体用例。包括磨砂玻璃效果,并使用占位符图像/头像。

打开