组件 超级菜单 简单黑暗模式大菜单

简单黑暗模式大菜单

一个简单、响应式的大型菜单组件,用于商业网站,使用深色模式和互补色彩方案。使用 Tailwind CSS 构建,支持暗色主题,无需 JavaScript。

预览

HTML 代码

<header class="bg-gray-900 text-gray-300">
  <nav class="container mx-auto px-6 py-4">
    <div class="flex items-center justify-between">
      <a href="#" class="text-xl font-bold text-white">Your Logo</a>
      <div class="hidden md:flex space-x-8">
        <div class="relative group">
          <button class="hover:text-white">Menu 1</button>
          <div class="absolute z-10 hidden group-hover:block bg-gray-800 p-6 rounded-md">
            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
              <div>
                <h3 class="font-bold text-white mb-2">Category 1</h3>
                <ul>
                  <li><a href="#" class="block hover:text-white py-1">Link 1</a></li>
                  <li><a href="#" class="block hover:text-white py-1">Link 2</a></li>
                  <li><a href="#" class="block hover:text-white py-1">Link 3</a></li>
                </ul>
              </div>
              <div>
                <h3 class="font-bold text-white mb-2">Category 2</h3>
                <ul>
                  <li><a href="#" class="block hover:text-white py-1">Link A</a></li>
                  <li><a href="#" class="block hover:text-white py-1">Link B</a></li>
                  <li><a href="#" class="block hover:text-white py-1">Link C</a></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
        <div class="relative group">
          <button class="hover:text-white">Menu 2</button>
          <div class="absolute z-10 hidden group-hover:block bg-gray-800 p-6 rounded-md">
            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
              <div>
                <h3 class="font-bold text-white mb-2">Category X</h3>
                <ul>
                  <li><a href="#" class="block hover:text-white py-1">Link X1</a></li>
                  <li><a href="#" class="block hover:text-white py-1">Link X2</a></li>
                  <li><a href="#" class="block hover:text-white py-1">Link X3</a></li>
                </ul>
              </div>
              <div>
                <h3 class="font-bold text-white mb-2">Category Y</h3>
                <ul>
                  <li><a href="#" class="block hover:text-white py-1">Link Y1</a></li>
                  <li><a href="#" class="block hover:text-white py-1">Link Y2</a></li>
                  <li><a href="#" class="block hover:text-white py-1">Link Y3</a></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
        <a href="#" class="hover:text-white">About</a>
        <a href="#" class="hover:text-white">Contact</a>
      </div>
      <div class="md:hidden">
        <button class="text-gray-300 hover:text-white focus:outline-none">
          <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16m-7 6h7"></path>
          </svg>
        </button>
      </div>
    </div>
  </nav>
</header>

相关组件

超级菜单组件 - 纸质/印刷复古加密

一个简单、响应式的大型菜单组件,具有纸张/印刷风格的设计和复古/复古调色板,适用于加密货币和区块链应用程序。包括深色模式支持。

打开

Mega Menu 组件

一个简单的深色模式电子商务大型菜单组件,具有灰度配色方案,使用 Tailwind CSS 构建。它是响应式的,包括对使用 Tailwind 的 dark: 前缀的深色主题的支持。

打开

玻璃化大菜单组件

Glassmorphism Mega Menu for Dashboard 与三色配色方案相连接。具有磨砂玻璃效果、响应式设计和使用 Tailwind CSS 的深色模式支持。

打开