媒体组件

一个采用拟物化风格的媒体组件,使用Tailwind CSS设计,具有响应式效果和暗色主题支持。

预览

HTML 代码

<div class="max-w-sm mx-auto">
    <div class="bg-white dark:bg-gray-800 shadow-lg rounded-lg overflow-hidden">
        <img class="w-full h-48 object-cover" src="https://picsum.photos/400/200" alt="Placeholder Image">
        <div class="p-6">
            <h2 class="text-2xl font-semibold text-gray-800 dark:text-white">Media Title</h2>
            <p class="text-gray-700 dark:text-gray-300">This is a description of the media component. It mimics a real-world object with its skeuomorphic design.</p>
            <div class="flex items-center mt-4">
                <img class="w-10 h-10 rounded-full border-2 border-white dark:border-gray-800" src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar">
                <div class="ml-3">
                    <p class="text-sm text-gray-600 dark:text-gray-400">Posted by John Doe</p>
                    <p class="text-xs text-gray-500 dark:text-gray-500">2 hours ago</p>
                </div>
            </div>
        </div>
    </div>
</div>
<style>
    /* Dark theme support */
    @media (prefers-color-scheme: dark) {
        body {
            background-color: #1A202C;
        }
    }
</style>

相关组件

媒体组件

一个采用拟物化风格的媒体显示组件,具有响应式设计和支持暗黑主题的功能。

打开

媒体组件 Component Component

用于金融/银行界面的响应式媒体组件,具有简洁的设计、蓝色调和深色模式支持。包括一个主内容区域,其中包含图像、标题、描述和作按钮,以及相关文章或见解的列表。

打开

Material Design 博客卡片

一个响应式博客文章卡片组件,其中包含图像、标题、摘录和作者信息,采用 Material Design 样式设计,具有温暖的日落色调。包括深色模式支持。

打开