组件 页眉 头部组件

头部组件

一个支持暗模式的响应式头部组件,包含了一个徽标、导航链接和一个号召性操作按钮。设计使用深色背景以减少眼睛疲劳。

预览

HTML 代码

<header class="bg-gray-900 text-gray-100">
  <div class="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center">
    <a class="flex title-font font-medium items-center text-white mb-4 md:mb-0">
      <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-10 h-10 text-white p-2 bg-indigo-500 rounded-full" viewBox="0 0 24 24">
        <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"></path>
      </svg>
      <span class="ml-3 text-xl">DarkMode Header</span>
    </a>
    <nav class="md:ml-auto flex flex-wrap items-center text-base justify-center">
      <a class="mr-5 hover:text-white">First Link</a>
      <a class="mr-5 hover:text-white">Second Link</a>
      <a class="mr-5 hover:text-white">Third Link</a>
      <a class="mr-5 hover:text-white">Fourth Link</a>
    </nav>
    <button class="inline-flex items-center bg-gray-800 border-0 py-1 px-3 focus:outline-none hover:bg-gray-700 rounded text-base mt-4 md:mt-0">Button
      <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-4 h-4 ml-1" viewBox="0 0 24 24">
        <path d="M5 12h14M12 5l7 7-7 7"></path>
      </svg>
    </button>
  </div>
</header>

相关组件

社交媒体标头组件

一个复杂的深色模式响应式标题组件,具有极简主义设计和互补的配色方案,专为社交媒体界面而设计。

打开

拟构标头组件

一个简单且响应式的 header 组件,专为具有拟物化风格的电子商务网站设计,使用灰度配色方案并支持深色模式。

打开

复杂仪表盘头部

一个复杂的响应式头部组件,具有3D设计元素,采用大地色调,专为仪表板设计。支持暗黑主题,使用Tailwind CSS,并使用picsum.photos和randomuser.me作为演示图片/头像。

打开