HTML 代码
<div class="flex flex-col items-center justify-center min-h-screen bg-gray-200 dark:bg-gray-800 p-6">
<div class="bg-white dark:bg-gray-900 rounded-lg shadow-lg p-5 w-full max-w-md text-center">
<div class="mb-4 rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-700 shadow-inner">
<img class="object-cover w-full h-32" src="https://picsum.photos/400/200" alt="File Preview">
</div>
<h2 class="text-lg font-semibold text-gray-800 dark:text-gray-200">File Name.jpg</h2>
<p class="text-gray-600 dark:text-gray-400">Size: 2.5 MB</p>
<p class="text-gray-600 dark:text-gray-400">Uploaded by: <img class="inline-block w-6 h-6 rounded-full" src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar"> John Doe</p>
<div class="mt-4 text-center">
<button class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded shadow-md focus:outline-none focus:shadow-outline">Download</button>
</div>
</div>
</div>
相关组件
野兽派文件查看器组件
一个原始、大胆的文件查看器组件,具有粗野主义设计原则。具有高对比度、非常规布局和故意粗糙的元素。该组件包括文件预览、元数据显示和作按钮,采用鲜明的灰度配色方案。使用 Tailwind CSS dark: 实用程序类,具有深色模式支持。适用于寻求独特视觉方法的商业/公司网站。