From a70e79de3a392914ce5aa790ce56295faed73141 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Mon, 3 Jan 2022 02:06:45 +0900 Subject: 擬似要素の文書を変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ja/web/css/_doublecolon_first-line/index.html | 119 --------------------- files/ja/web/css/_doublecolon_first-line/index.md | 119 +++++++++++++++++++++ 2 files changed, 119 insertions(+), 119 deletions(-) delete mode 100644 files/ja/web/css/_doublecolon_first-line/index.html create mode 100644 files/ja/web/css/_doublecolon_first-line/index.md (limited to 'files/ja/web/css/_doublecolon_first-line') diff --git a/files/ja/web/css/_doublecolon_first-line/index.html b/files/ja/web/css/_doublecolon_first-line/index.html deleted file mode 100644 index b9477f4b31..0000000000 --- a/files/ja/web/css/_doublecolon_first-line/index.html +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: '::first-line (:first-line)' -slug: 'Web/CSS/::first-line' -tags: - - CSS - - Layout - - Pseudo-element - - Reference - - Selector -translation_of: 'Web/CSS/::first-line' ---- -
{{CSSRef}}
- -

::first-lineCSS擬似要素で、ブロックレベル要素の最初の行にスタイルを適用します。なお、最初の行の長さは要素の幅、文書の幅、文字列のフォントの大きさなど、様々な要因に左右されます。

- -
/* <p> の最初の行を選択 */
-p::first-line {
-  color: red;
-}
- -
-

CSS3 では ::first-line という (二重コロン付き) 表記が、 擬似クラス擬似要素を見分けやすくするために導入されました。ブラウザーでは CSS2 で導入された :first-line も使用できます。

-
- -

利用可能なプロパティ

- -

::first-line 擬似要素では、一部の CSS プロパティのみが利用できます。

- - - -

構文

- -{{csssyntax}} - -

- -

HTML

- -
<p>スタイルはこの段落の最初の行にのみ適用されます。
-その後のすべての文字列は普通のスタイルになります。分かりますか?</p>
-
-<span>ブロックレベル要素ではないので、この文字列の最初の行は、
-特殊なスタイルになりません。</span>
- -

CSS

- -
::first-line {
-  color: blue;
-  text-transform: uppercase;
-
-
-  /* 警告: これらを使用しないでください */
-  /* ::first-line 擬似要素では多くのプロパティが無効になります */
-  margin-left: 20px;
-  text-indent: 20px;
-}
- -

結果

- -

{{EmbedLiveSample('Examples', 350, 160)}}

- -

仕様書

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS4 Pseudo-Elements', '#first-line-pseudo', '::first-line')}}{{Spec2('CSS4 Pseudo-Elements')}}::first-letter を利用できる場所をもっと厳密に定義。
- 利用できるプロパティを組版、文字装飾、インライン配置、 {{cssxref("opacity")}} に一般化。
- ::first-letter の継承を定義。
{{SpecName('CSS3 Text Decoration', '#text-shadow-property', 'text-shadow with ::first-line')}}{{Spec2('CSS3 Text Decoration')}}::first-letter で {{cssxref("text-shadow")}} が使用できるようになった。
{{SpecName('CSS3 Selectors', '#first-line', '::first-line')}}{{Spec2('CSS3 Selectors')}}擬似要素用の二重コロン構文の導入。
{{SpecName('CSS2.1', 'selector.html#first-line-pseudo', '::first-line')}}{{Spec2('CSS2.1')}}変更なし。
{{SpecName('CSS1', '#the-first-line-pseudo-element', '::first-line')}}{{Spec2('CSS1')}}初回定義、単一コロン構文を使用。
- -

ブラウザーの互換性

- -
-

{{Compat("css.selectors.first-line")}}

-
- -

関連情報

- - diff --git a/files/ja/web/css/_doublecolon_first-line/index.md b/files/ja/web/css/_doublecolon_first-line/index.md new file mode 100644 index 0000000000..b9477f4b31 --- /dev/null +++ b/files/ja/web/css/_doublecolon_first-line/index.md @@ -0,0 +1,119 @@ +--- +title: '::first-line (:first-line)' +slug: 'Web/CSS/::first-line' +tags: + - CSS + - Layout + - Pseudo-element + - Reference + - Selector +translation_of: 'Web/CSS/::first-line' +--- +
{{CSSRef}}
+ +

::first-lineCSS擬似要素で、ブロックレベル要素の最初の行にスタイルを適用します。なお、最初の行の長さは要素の幅、文書の幅、文字列のフォントの大きさなど、様々な要因に左右されます。

+ +
/* <p> の最初の行を選択 */
+p::first-line {
+  color: red;
+}
+ +
+

CSS3 では ::first-line という (二重コロン付き) 表記が、 擬似クラス擬似要素を見分けやすくするために導入されました。ブラウザーでは CSS2 で導入された :first-line も使用できます。

+
+ +

利用可能なプロパティ

+ +

::first-line 擬似要素では、一部の CSS プロパティのみが利用できます。

+ + + +

構文

+ +{{csssyntax}} + +

+ +

HTML

+ +
<p>スタイルはこの段落の最初の行にのみ適用されます。
+その後のすべての文字列は普通のスタイルになります。分かりますか?</p>
+
+<span>ブロックレベル要素ではないので、この文字列の最初の行は、
+特殊なスタイルになりません。</span>
+ +

CSS

+ +
::first-line {
+  color: blue;
+  text-transform: uppercase;
+
+
+  /* 警告: これらを使用しないでください */
+  /* ::first-line 擬似要素では多くのプロパティが無効になります */
+  margin-left: 20px;
+  text-indent: 20px;
+}
+ +

結果

+ +

{{EmbedLiveSample('Examples', 350, 160)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS4 Pseudo-Elements', '#first-line-pseudo', '::first-line')}}{{Spec2('CSS4 Pseudo-Elements')}}::first-letter を利用できる場所をもっと厳密に定義。
+ 利用できるプロパティを組版、文字装飾、インライン配置、 {{cssxref("opacity")}} に一般化。
+ ::first-letter の継承を定義。
{{SpecName('CSS3 Text Decoration', '#text-shadow-property', 'text-shadow with ::first-line')}}{{Spec2('CSS3 Text Decoration')}}::first-letter で {{cssxref("text-shadow")}} が使用できるようになった。
{{SpecName('CSS3 Selectors', '#first-line', '::first-line')}}{{Spec2('CSS3 Selectors')}}擬似要素用の二重コロン構文の導入。
{{SpecName('CSS2.1', 'selector.html#first-line-pseudo', '::first-line')}}{{Spec2('CSS2.1')}}変更なし。
{{SpecName('CSS1', '#the-first-line-pseudo-element', '::first-line')}}{{Spec2('CSS1')}}初回定義、単一コロン構文を使用。
+ +

ブラウザーの互換性

+ +
+

{{Compat("css.selectors.first-line")}}

+
+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf