组件 资本 复古博客模态

复古博客模态

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

预览

HTML 代码

<div class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full" id="my-modal">
  <div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white dark:bg-cyan-800 dark:text-white">
    <div class="mt-3 text-center">
      <div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-cyan-100 dark:bg-cyan-600">
        <svg class="h-6 w-6 text-cyan-600 dark:text-cyan-100" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>
      </div>
      <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">Modal Title</h3>
      <div class="mt-2 px-7 py-3">
        <p class="text-sm text-gray-500 dark:text-gray-200">Modal Content Goes Here. Replace with your blog content or message.</p>
        <img class="mt-4 rounded-md" src="https://picsum.photos/400/200" alt="Placeholder Image">
        <div class="flex justify-center mt-4">
          <img class="h-10 w-10 rounded-full mr-4" src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar">
          <img class="h-10 w-10 rounded-full" src="https://randomuser.me/api/portraits/women/1.jpg" alt="Avatar">
        </div>
      </div>
      <div class="items-center px-4 py-3">
        <button id="ok-btn" class="px-4 py-2 bg-cyan-500 text-white text-base font-medium rounded-md w-full shadow-sm hover:bg-cyan-600 focus:outline-none focus:ring-2 focus:ring-cyan-300 dark:bg-cyan-700 dark:hover:bg-cyan-900 dark:focus:ring-cyan-800">
          Close
        </button>
      </div>
    </div>
  </div>
</div>

相关组件

复古复古模态组件

一个简单的 retro/vintage 模态组件,带有互补的配色方案,用于展示工作或产品,使用 Tailwind CSS 设计。

打开

黑暗模式模态组件

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

打开

Art_Deco_Government_Modal

一个响应式的、受装饰艺术启发的模态组件,适用于政府和公共服务网站,具有几何图案、奢华的造型和类似的配色方案。包括深色模式支持。

打开