- .htaccess
- 404エラー
- All-in-One WP Migration
- API Key
- background
- Bootstrap4
- border
- Canonet
- Contact Form 7
- Contact Form7
- css
- Easy FancyBox
- fixed
- flex
- font
- Font−family
- googlemap
- header.php
- Intuitive Custom Post Order
- Lightbox
- MW WP Form
- ol
- PHP
- reCAPTCHA
- SSL
- SVG
- text-shadow
- the_content
- wordpress削除
- youtube
- アイキャッチ
- アコーディオン
- アコーディオンメニュー
- アニメーション
- アンカーリンク
- エックスドメイン
- エディター
- エフェクト
- カスタムフィールド
- カテゴリー
- カラー
- カレント
- かんたんインストール
- サーバー移行
- さくらのレンタルサーバー
- スクロール
- スパムメール
- スムーススクロール
- タグ
- ツイッター
- データベース
- ドメイン
- ドメイン移管
- トリミング
- ドロップダウン
- にゅるっと
- ネームサーバー
- パーミッション
- パスワード保護
- バックアップ
- ハンバーガー
- ハンバーガーメニュー
- ファイルサイズ
- フォント
- プレビュー
- マウスオーバー
- ムームー
- ラベル
- リスト
- リスト横並び
- リダイレクト
- レスポンシブ
- ローディング
- ロリポップ
- 並び替え
- 名刺
- 固定ページ
- 投稿記事
- 投稿詳細ページ
- 擬似クラス
- 文字制限
- 条件分岐
- 無料のレンタルサーバー
- 背景画像
- 記事一覧
- 記事一覧ページ
- 記事詳細ページ
bootstrapのclassも少し利用しています。
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<div class="sideMenu"> <ul> <li> <div class="side-title s_category"> <a data-toggle="collapse" href="#acc01">カテゴリ一覧</a> </div> <ul id="acc01" class="panel collapse"> <li> <a href="/#/">メニュー1</a> </li> <li> <a href="/#/">メニュー1</a> </li> <li> <a href="/#/">メニュー1</a> </li> </ul> </li> </ul> </div> |
aタグhref=”#acc01″
ulのidをid=”acc01″と合わせる
開閉で矢印の向きを変えるCSS
リンク要素.side-title s_categoryに矢印を追加します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
.s_category a:after { content: ""; display: inline-block; position: absolute; width: 20px; height: 20px; top: 2px; right: 0px; background: url(../img/expand-button.png) no-repeat; background-size: contain; -webkit-background-size: contain; -moz-background-size: contain; -o-background-size: contain; } .s_category a[aria-expanded="true"]:after { content: ""; display: inline-block; position: absolute; width: 20px; height: 20px; top: 2px; right: 0px; background: url(../img/expand-up.png) no-repeat; background-size: contain; -webkit-background-size: contain; -moz-background-size: contain; -o-background-size: contain; } |
参考URL(アコーディオン):http://bootstrap.hana87.club/collapse.html
参考URL(開閉矢印):https://inbox-design.com/301