CSS ::first-line 仮要素
- 前のページ ::first-letter
- 次のページ ::grammar-error
- 上一階層に戻る CSS 伪要素リファレンスマニュアル
定義と使用方法
CSS ::first-line
仮要素は、ブロックレベル要素の第一行のスタイルを設定するために使用されます。
注意:以下の属性は、以下と一緒に使用できます: ::first-line
一緒に使用:
- すべてのフォント属性
- すべての背景属性
- color
- text-shadow
- word-spacing
- letter-spacing
- text-transform
- text-decoration
- text-decoration-color
- text-decoration-line
- text-decoration-style
- vertical-align
- line-height
例
各<p>要素の第一行のスタイルを選択および設定します:
p::first-line { font-size: 20px; text-decoration: underline; background-color: lightgreen; }
CSS文法
::first-line { css宣言; }
技術的詳細
バージョン: | CSS1 |
---|
ブラウザのサポート
このテーブルの数字は、その仮要素を完全にサポートする最初のブラウザのバージョンを指定しています。
クローム | エッジ | ファイアフォックス | サファリ | オペラ |
---|---|---|---|---|
1.0 | 9.0 | 1.0 | 1.0 | 7.0 |
関連ページ
チュートリアル:CSS 仮要素
- 前のページ ::first-letter
- 次のページ ::grammar-error
- 上一階層に戻る CSS 伪要素リファレンスマニュアル