HTML 代码
<div class="max-w-lg mx-auto p-4 bg-slate-200 dark:bg-slate-800 rounded-lg shadow-lg">
<div class="relative overflow-hidden rounded-lg">
<img class="w-full h-64 object-cover mb-4" src="https://picsum.photos/600/400" alt="Product Image">
<div class="absolute top-2 right-2 bg-white dark:bg-gray-800 rounded-full shadow">
<img class="w-10 h-10 rounded-full border-2 border-gray-300 dark:border-gray-600" src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar">
</div>
</div>
<h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200 mb-2">Product Title</h2>
<p class="text-gray-600 dark:text-gray-400 mb-4">This is a description of the product that mimics natural textures and colors, providing an earthy feel.</p>
<div class="flex items-center justify-between">
<span class="text-lg font-bold text-gray-900 dark:text-gray-100">$29.99</span>
<button class="px-4 py-2 bg-green-500 dark:bg-green-700 text-white rounded-lg shadow hover:bg-green-600 dark:hover:bg-green-800 transition duration-300">Add to Cart</button>
</div>
</div>
相关组件
Retro Media 嵌入组件
具有“复古/复古”设计的响应式媒体嵌入组件,灵感来自 80 年代/90 年代的美学,如旧 CRT 显示器和 VCR 播放器。它在石板灰色底色上使用蓝绿色和橙色的互补配色方案,适用于“商业/公司”网站。该组件具有中等复杂度,在播放按钮和媒体缩略图上具有悬停效果、仿 REC 灯光动画和装饰性非功能性控制元素。它包括使用 Tailwind 的 'dark:' 前缀的深色主题支持。媒体区域设计为 16:9 纵横比(需要 Tailwind 纵横比插件或 CSS 回退,如 padding-bottom 技巧)。使用 picsum.photos 中的占位符图像。