コンテンツリンクコンポーネントにスキップする
Tailwind CSS を使用して、レスポンシブ効果とダークテーマのサポートを備えた 3D スタイルの「コンテンツにスキップ」リンクを提供する Web コンポーネント。
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>
関連コンポーネント
コンテンツリンクにスキップする
マテリアルデザインの原則に沿ったコンテンツリンクコンポーネントにスキップし、レスポンシブデザイン、ダークモードのサポート、ソーシャルメディアアプリケーション向けのシンプルなモノクロ配色を特徴としています。
コンテンツリンクにスキップする
Neumorphismデザインスタイル、トライアドカラースキーム、ブログやコンテンツWebサイトの複雑なレイアウトを備えたコンテンツリンクコンポーネントにスキップします。レスポンシブデザインとTailwind CSSを使用したダークモードのサポートが含まれています。
コンテンツリンクにスキップする
ビジネスWebサイト用の3Dグレースケールデザインのコンテンツリンクコンポーネントにスキップします。レスポンシブで、Tailwind CSSを使用したダークモードをサポートしています。JavaScript はありません。