组件 资本 复古模态组件

复古模态组件

一个响应式复古/复古风格的模态组件,使用Tailwind CSS设计,支持暗模式,融入怀旧的80年代/90年代美学。

预览

HTML 代码

<div class="fixed inset-0 flex items-center justify-center bg-gray-900 bg-opacity-75 transition-opacity" id="modal-wrapper">
    <div class="bg-white rounded-lg shadow-lg max-w-md w-full p-6 sm:p-8">
        <div class="flex justify-between items-center">
            <h2 class="text-xl font-semibold text-gray-800 dark:text-gray-300">Retro Modal Title</h2>
            <button class="text-gray-600 dark:text-gray-300 hover:text-gray-800 dark:hover:text-gray-200 focus:outline-none" id="modal-close">
                &times;
            </button>
        </div>
        <div class="mt-4">
            <img src="https://picsum.photos/400/200?random=1" alt="Placeholder Image" class="w-full h-auto rounded-md">
            <p class="mt-2 text-gray-600 dark:text-gray-400">This is a nostalgic modal component inspired by the vintage aesthetics of the 80s and 90s. It features a simple layout and dark mode support.</p>
            <div class="flex items-center mt-4">
                <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar" class="w-10 h-10 rounded-full">
                <span class="ml-2 text-gray-700 dark:text-gray-300">John Doe</span>
            </div>
        </div>
        <div class="mt-6 flex justify-end">
            <button class="bg-blue-500 text-white rounded-md px-4 py-2 hover:bg-blue-600 dark:bg-blue-700 dark:hover:bg-blue-600">Action</button>
        </div>
    </div>
</div>
<!-- Dark Mode Styles -->
<style>
    @media (prefers-color-scheme: dark) {
        #modal-wrapper {
            background-color: rgba(31, 41, 55, 0.75);
        }
    }
</style>

相关组件

黑暗模式模态组件

一个简单的响应式模态组件,专为社交媒体界面设计,适用于暗黑模式,采用粉彩色方案。

打开

模态组件

一个响应式模态组件,采用微交互和三元配色方案设计,适用于社交媒体界面。具有用户交互时的动画效果,并使用Tailwind CSS提供暗主题支持。

打开

复古博客模态

一个复古风格的模态组件,适用于博客内容,特色是互补的配色方案,适度复杂的互动元素,响应式设计,并支持深色模式。未使用JavaScript,仅依赖HTML和Tailwind CSS类。图片来源于picsum.photos,头像来源于randomuser.me。

打开