组件 跳至内容链接 跳过内容链接组件

跳过内容链接组件

提供3D样式的“跳到内容”链接的网页组件,具有响应效果和深色主题支持,使用Tailwind CSS。

预览

HTML 代码

<div class="relative group">
    <a href="#main-content" class="inline-block px-4 py-2 text-white bg-blue-500 rounded-full shadow-lg transform transition-transform duration-300 ease-in-out hover:scale-105 hover:shadow-2xl dark:bg-blue-700 dark:shadow-lg dark:hover:scale-110">
        Skip to Content
    </a>
    <div class="absolute left-0 translate-y-full opacity-0 group-hover:opacity-100 transition-opacity duration-300 ease-in-out">
        <div class="bg-gray-800 dark:bg-gray-900 text-white text-xs rounded-lg p-2 shadow-lg">
            Skip past navigation and other elements to main content.
        </div>
    </div>
</div>

<div id="main-content" class="mt-10 bg-gray-100 dark:bg-gray-800 p-6 rounded-lg shadow-md">
    <h1 class="text-2xl font-bold text-gray-900 dark:text-white">Main Content Area</h1>
    <p class="mt-4 text-gray-700 dark:text-gray-300">This is where the main content goes. You can add your text and images here.</p>
    <img src="https://picsum.photos/600/400" alt="Random placeholder" class="mt-4 rounded-lg shadow-md">
    <p class="mt-4 text-gray-700 dark:text-gray-300">You can use this space to illustrate the content being referred to by the 'Skip to Content' link.</p>
</div>

相关组件

跳到内容链接组件

一个设计有拟物化元素类似于物理按钮的跳转到内容链接组件。该组件将采用柔和的色彩方案,适中的复杂性,包括悬停效果,并支持黑暗主题。

打开

跳至内容链接

一个响应式跳转到内容链接组件,采用拟物化风格和柔和的颜色方案。该组件适用于博客和内容消费,并支持黑暗模式。

打开

跳至内容链接组件

一个提供跳转到主要内容链接的网页组件,采用材料设计风格,配有粉彩色彩方案,适用于电子商务网站。它具有响应式设计,并支持黑暗主题。

打开