组件 页眉 标题组件

标题组件

一个响应式页头组件,采用极简主义风格,具有淡色配色方案,适用于博客或内容网站,并包含深色主题支持。

预览

HTML 代码

<header class="bg-pastel-100 dark:bg-gray-800 p-6 flex items-center justify-between">
    <div class="flex items-center space-x-3">
        <img src="https://picsum.photos/50/50" alt="Logo" class="rounded-full">
        <h1 class="text-xl font-bold text-gray-900 dark:text-white">My Blog</h1>
    </div>
    <nav class="space-x-4">
        <a href="#" class="text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition duration-300">Home</a>
        <a href="#" class="text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition duration-300">About</a>
        <a href="#" class="text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition duration-300">Blog</a>
        <a href="#" class="text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition duration-300">Contact</a>
    </nav>
    <div class="flex items-center space-x-2">
        <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-10 h-10 rounded-full">
        <span class="text-gray-900 dark:text-white">Username</span>
    </div>
</header>

<style>
    @tailwind base;
    @tailwind components;
    @tailwind utilities;

    @layer base {
        /* Define pastel colors */
        .bg-pastel-100 {
            background-color: #F9D7C1;
        }
    }
</style>

相关组件

材料设计商业头部

灵感来自Material Design的简单头部组件,配有互补色彩方案,适用于商业网站。响应式设计,支持深色主题。

打开

电子商务标题组件

一个响应迅速、充满活力、受 Material Design 启发的标题组件,适用于电子商务网站,具有导航、搜索和用户作功能。支持深色模式。

打开

头部组件

一个响应式的头部组件,具有微交互功能、小型吸引人的动画,并支持使用Tailwind CSS的暗黑主题。

打开