jQuery と CSS3 のスタック カード スタイル ナビゲーション メニュー特殊効果_html/css_WEB-ITnose
簡単なチュートリアル
これは、非常にクールな jQuery と CSS3 のスタック カード スタイルのナビゲーション メニュー効果です。このナビゲーション メニュー効果では、ユーザーがハンバーガー ボタンをクリックすると、各サブメニューがカードの形式でビューポートに積み重ねられて配置され、対応するサブメニューをクリックすると、対応するページに切り替わります。
デモを見る プラグインをダウンロードする
使い方
HTML 構造
ナビゲーション メニューの HTML 構造は、ネストされた
<div class="demo"> <div class="demo__close-menu"></div> <div class="demo__section demo__section-1" data-section="1"> <div class="demo__menu-btn"></div> <h2 class="demo__section-heading">Contact</h2> </div> <div class="demo__section demo__section-2 active" data-section="2"> <div class="demo__menu-btn"></div> <h2 class="demo__section-heading">About</h2> </div> <div class="demo__section demo__section-3 inactive" data-section="3"> <div class="demo__menu-btn"></div> <h2 class="demo__section-heading">Team</h2> </div> <div class="demo__section demo__section-4 inactive" data-section="4"> <div class="demo__menu-btn"></div> <h2 class="demo__section-heading">Projects</h2> </div></div>
CSS スタイル
ハンバーガー アイコン ボタンのスタイルは次のとおりです:
.demo__close-menu { position: absolute; left: 22px; top: 22px; width: 29px; cursor: pointer;}.demo__close-menu:before, .demo__close-menu:after { content: ""; position: absolute; left: 0; top: 8px; width: 100%; height: 4px; background: #7097B0;}.demo__close-menu:before { -webkit-transform: rotate(45deg); transform: rotate(45deg);}.demo__close-menu:after { -webkit-transform: rotate(-45deg); transform: rotate(-45deg);}
スタック カード ページのメイン CSS スタイルは次のとおりです:
.demo { overflow: hidden; position: absolute; width: 100%; height: 100%; background: #CDDBEE; border-radius: 6px;} .demo__section { z-index: 1; position: absolute; left: 0; top: 0; width: 100%; height: 100%; padding: 25px 0 0 65px; border-radius: inherit; -webkit-transition: -webkit-transform 0.4s; transition: -webkit-transform 0.4s; transition: transform 0.4s; transition: transform 0.4s, -webkit-transform 0.4s; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); will-change: transform;} .demo.menu-active .demo__section-1 { -webkit-transform: translate3d(20px, 60px, 0); transform: translate3d(20px, 60px, 0);} .demo__section-1.inactive { -webkit-transform: translate3d(100%, 60px, 0); transform: translate3d(100%, 60px, 0);} .demo.menu-active .demo__section-2 { -webkit-transform: translate3d(40px, 120px, 0); transform: translate3d(40px, 120px, 0);} .demo__section-2.inactive { -webkit-transform: translate3d(100%, 120px, 0); transform: translate3d(100%, 120px, 0);} .demo.menu-active .demo__section-3 { -webkit-transform: translate3d(60px, 180px, 0); transform: translate3d(60px, 180px, 0);} .demo__section-3.inactive { -webkit-transform: translate3d(100%, 180px, 0); transform: translate3d(100%, 180px, 0);} .demo.menu-active .demo__section-4 { -webkit-transform: translate3d(80px, 240px, 0); transform: translate3d(80px, 240px, 0);} .demo__section-4.inactive { -webkit-transform: translate3d(100%, 240px, 0); transform: translate3d(100%, 240px, 0);} .demo.menu-active .demo__section { cursor: pointer; } .demo__section-heading { text-transform: uppercase; font-size: 12px; -webkit-transition: -webkit-transform 0.4s; transition: -webkit-transform 0.4s; transition: transform 0.4s; transition: transform 0.4s, -webkit-transform 0.4s;} .demo.menu-active .demo__section-heading { -webkit-transform: translateX(-45px); transform: translateX(-45px);}
JavaScript
この特殊効果では jQuery コードが使用されています。ハンバーガー ボタンのクリック イベントとスタック カード メニューの Switch イベントを処理します。
すごい出典: jQuery ホーム

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック











HTMLは、簡単に学習しやすく、結果をすばやく見ることができるため、初心者に適しています。 1)HTMLの学習曲線はスムーズで簡単に開始できます。 2)基本タグをマスターして、Webページの作成を開始します。 3)柔軟性が高く、CSSおよびJavaScriptと組み合わせて使用できます。 4)豊富な学習リソースと最新のツールは、学習プロセスをサポートしています。

HTMLはWeb構造を定義し、CSSはスタイルとレイアウトを担当し、JavaScriptは動的な相互作用を提供します。 3人はWeb開発で職務を遂行し、共同でカラフルなWebサイトを構築します。

Anexampleapalofastartingtaginhtmlis、それはaperginsaparagraph.startingtagsaresentionentientiontheyinitiateelements、definetheirtypes、およびarecrucialforurturingwebpagesandcontingthomedomを構築します。

webdevelopmentReliesOnhtml、css、andjavascript:1)htmlStructuresContent、2)cssStylesit、および3)Javascriptaddsinteractivity、形成、

GiteEpages静的Webサイトの展開が失敗しました:404エラーのトラブルシューティングと解像度Giteeを使用する

Y軸位置Webアノテーション機能の適応アルゴリズムこの記事では、単語文書と同様の注釈関数、特に注釈間の間隔を扱う方法を実装する方法を探ります...

HTML、CSS、およびJavaScriptは、Web開発の3つの柱です。 1。HTMLは、Webページ構造を定義し、などなどのタグを使用します。2。CSSは、色、フォントサイズなどのセレクターと属性を使用してWebページスタイルを制御します。

画像をクリックした後、散乱と周囲の画像を拡大する効果を実現するには、多くのWebデザインがインタラクティブな効果を実現する必要があります。特定の画像をクリックして周囲を作成してください...
