- .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
- アイキャッチ
- アコーディオン
- アコーディオンメニュー
- アニメーション
- アンカーリンク
- エックスドメイン
- エディター
- エフェクト
- カスタムフィールド
- カテゴリー
- カラー
- カレント
- かんたんインストール
- サーバー移行
- さくらのレンタルサーバー
- スクロール
- スパムメール
- スムーススクロール
- タグ
- ツイッター
- データベース
- ドメイン
- ドメイン移管
- トリミング
- ドロップダウン
- にゅるっと
- ネームサーバー
- パーミッション
- パスワード保護
- バックアップ
- ハンバーガー
- ハンバーガーメニュー
- ファイルサイズ
- フォント
- プレビュー
- マウスオーバー
- ムームー
- ラベル
- リスト
- リスト横並び
- リダイレクト
- レスポンシブ
- ローディング
- ロリポップ
- 並び替え
- 名刺
- 固定ページ
- 投稿記事
- 投稿詳細ページ
- 擬似クラス
- 文字制限
- 条件分岐
- 無料のレンタルサーバー
- 背景画像
- 記事一覧
- 記事一覧ページ
- 記事詳細ページ
擬似要素「:before」を使った3つの実用的なli装飾の方法
フォントを使ったテキスト装飾
1 2 3 4 5 6 7 8 9 |
li:before { display: block; content: "・"; width: 1em; height: 1em; position: absolute; left: 0; top: 0; } |
backgroundに画像を指定した装飾
1 2 3 4 5 6 7 8 9 10 11 12 13 |
li:before { display: block; content: ""; width: 12px; height: 12px; position: absolute; left: 0; top: 4px; background-image: url(../img/head-arrow.png); background-repeat: no-repeat; background-position: 50% 50%; background-size: 100% auto; } |
FontAwesomeを指定した装飾
1 2 3 4 5 6 7 8 9 10 |
li:before { display: block; content: "\f101"; font-family: "FontAwesome"; width: 1em; height: 1em; position: absolute; left: 0; top: 0; } |
最近よく使う装飾
1 2 3 4 5 6 7 8 9 10 |
:before { content: ''; display: inline-block; width: 26px; height: 20px; background-image: url(../img/ico_hand.png); background-repeat: no-repeat; background-size: contain; vertical-align: middle; } |