拟物化通知组件
一个受拟物化启发的简单响应式通知组件,具有适用于商业/公司网站的类似配色方案。它包括深色主题支持,并使用 Tailwind CSS 进行样式设置。图片来自 picsum.photos 和 randomuser.me 的头像。
HTML 代码
<div class="container mx-auto p-4 bg-gray-100 dark:bg-gray-800 rounded-lg shadow-xl">
<div class="flex items-center space-x-4">
<img class="w-12 h-12 rounded-full ring-2 ring-blue-300" src="https://randomuser.me/api/portraits/men/85.jpg" alt="User Avatar">
<div>
<div class="text-lg font-semibold text-gray-800 dark:text-gray-200">New Notification</div>
<p class="text-sm text-gray-600 dark:text-gray-400">You have a new message from John Doe.</p>
</div>
</div>
<div class="mt-4 flex justify-end">
<button class="px-4 py-2 bg-blue-500 text-white rounded-full shadow hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-50 dark:bg-blue-700 dark:hover:bg-blue-800">
View
</button>
</div>
</div>