组件 汉堡菜单 汉堡菜单组件

汉堡菜单组件

适用于商业/公司网站的极简/扁平化设计响应式汉堡菜单组件,使用柔和的配色方案并支持深色模式。

预览

HTML 代码

<nav class="bg-white dark:bg-gray-800 p-4 rounded shadow">
    <div class="flex justify-between items-center">
        <div class="text-2xl font-bold text-gray-800 dark:text-white">
            Logo
        </div>
        <button id="menu-toggle" class="text-gray-800 dark:text-white focus:outline-none">
            <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="w-8 h-8">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16m-7 6h7"/>
            </svg>
        </button>
    </div>
    <div id="menu" class="hidden mt-4">
        <ul class="flex flex-col space-y-2">
            <li><a href="#" class="text-gray-800 dark:text-white hover:underline">Home</a></li>
            <li><a href="#" class="text-gray-800 dark:text-white hover:underline">About</a></li>
            <li><a href="#" class="text-gray-800 dark:text-white hover:underline">Services</a></li>
            <li><a href="#" class="text-gray-800 dark:text-white hover:underline">Contact</a></li>
        </ul>
    </div>
</nav>
<style>
    @media (min-width: 768px) {
        #menu {
            display: flex;
            flex-direction: row;
            justify-content: flex-end;
            margin-top: 0;
        }
        #menu-toggle {
            display: none;
        }
    }
</style>

相关组件

3D汉堡菜单组件

响应式汉堡菜单,采用 3D 设计,融合了三色配色方案和复杂的互动元素,适用于商业/企业网站。

打开

汉堡菜单组件

一个采用粗野主义风格设计的响应式汉堡菜单组件,使用 Tailwind CSS,具有深色模式支持和图像及头像的占位符。

打开

Art Deco 运动/健身汉堡菜单

一个复杂、响应迅速的汉堡菜单组件,具有装饰艺术美学、柔和的配色方案和深色模式支持,适用于运动和健身应用程序。

打开