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

媒体嵌入组件

一个复古/怀旧的媒体嵌入组件,以80年代和90年代的怀旧设计。它具有响应式样式和使用Tailwind CSS支持的深色模式。

预览

HTML 代码

<div class="max-w-md mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
    <div class="relative">
        <img class="w-full" src="https://picsum.photos/600/400?random=1" alt="Media Thumbnail" />
        <div class="absolute top-0 left-0 right-0 bottom-0 bg-black opacity-25"></div>
        <div class="absolute top-2 right-2 bg-white dark:bg-gray-900 text-gray-800 dark:text-white rounded-full p-2 shadow flex items-center">
            <img class="rounded-full w-8 h-8 border-2 border-gray-300 dark:border-gray-600" src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar" />
        </div>
    </div>
    <div class="p-4">
        <h2 class="text-xl font-bold text-gray-800 dark:text-white">Vintage Media Title</h2>
        <p class="mt-2 text-gray-600 dark:text-gray-300">This is a description of the media embed component. It encompasses a retro aesthetic reminiscent of the 80s and 90s, adorned with bright colors and distinctive patterns.</p>
        <div class="mt-4 flex justify-between items-center">
            <span class="text-sm text-gray-500 dark:text-gray-400">Posted on 01 Jan 1990</span>
            <a href="#" class="bg-pink-500 text-white px-3 py-1 rounded-full hover:bg-pink-600 transition">Watch Now</a>
        </div>
    </div>
</div>
<style>
  @media (prefers-color-scheme: dark) {
    .dark\:bg-gray-800 {
      background-color: #2d3748;
    }
    .dark\:text-white {
      color: #fff;
    }
    .dark\:text-gray-300 {
      color: #e2e8f0;
    }
    .dark\:text-gray-400 {
      color: #cbd5e0;
    }
    .dark\:bg-gray-900 {
      background-color: #1a202c;
    }
    .dark\:border-gray-600 {
      border-color: #4a5568;
    }
  }
</style>

相关组件

媒体嵌入组件

一个媒体嵌入组件,设计有 glassmorphism 效果,具有响应式设计,适用于支持深色主题的商业网站。

打开

媒体嵌入组件

一个响应式媒体嵌入组件,采用新拟态设计,具有鲜艳的色彩和适合仪表板应用的交互界面。

打开

媒体嵌入组件

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

打开