From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/css/counter-increment/index.html | 120 ++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 files/ja/web/css/counter-increment/index.html (limited to 'files/ja/web/css/counter-increment') diff --git a/files/ja/web/css/counter-increment/index.html b/files/ja/web/css/counter-increment/index.html new file mode 100644 index 0000000000..52058c8293 --- /dev/null +++ b/files/ja/web/css/counter-increment/index.html @@ -0,0 +1,120 @@ +--- +title: counter-increment +slug: Web/CSS/counter-increment +tags: + - CSS + - CSS Counter + - CSS Lists + - CSS Property + - Reference + - 'recipe:css-property' +translation_of: Web/CSS/counter-increment +--- +
{{CSSRef}}
+ +

CSScounter-increment プロパティは、指定された値によって CSS カウンターの値を増加又は減少させるためのプロパティです。

+ +
{{EmbedInteractiveExample("pages/css/counter-increment.html")}}
+ + + +
+

注: カウンターの値は CSS の {{cssxref("counter-reset")}} プロパティを使用して任意の値にリセットすることができます。

+
+ +

構文

+ +
/* "my-counter" を 1 増加 */
+counter-increment: my-counter;
+
+/* "my-counter" を 1 減少 */
+counter-increment: my-counter -1;
+
+/* "counter1" を 1 増加、 "counter2" を 4 減少 */
+counter-increment: counter1 counter2 -4;
+
+/* 増加又は減少させない。より詳細度が低い規則を上書きするために使用 */
+counter-increment: none;
+
+/* グローバル値 */
+counter-increment: inherit;
+counter-increment: initial;
+counter-increment: unset;
+
+ +

counter-increment プロパティは、以下の値のうちの一つで指定します。

+ + + +

+ +
+
{{cssxref("<custom-ident>")}}
+
増加の対象となる、カウンターの名前です。
+
{{cssxref("<integer>")}}
+
カウンタに加える値です。指定されない場合は既定値の 1 になります。
+
none
+
カウンターは増加しません。これは既定値として、またはより詳細な規則によって増加を取り消すために使用することができます。
+
+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

名前付きカウンターの増加

+ +
h1 {
+  counter-increment: chapter section 2 page;
+  /* chapter と page カウンタの値を 1 、
+     section カウンタの値を 2 増加させます。 */
+}
+
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS3 Lists", "#propdef-counter-increment", "counter-increment")}}{{Spec2("CSS3 Lists")}}変更なし
{{SpecName("CSS2.1", "generate.html#propdef-counter-increment", "counter-increment")}}{{Spec2("CSS2.1")}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.properties.counter-increment")}}

+ +

関連情報

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