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-reset/index.html | 115 ++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 files/ja/web/css/counter-reset/index.html (limited to 'files/ja/web/css/counter-reset/index.html') diff --git a/files/ja/web/css/counter-reset/index.html b/files/ja/web/css/counter-reset/index.html new file mode 100644 index 0000000000..3a0ac5be80 --- /dev/null +++ b/files/ja/web/css/counter-reset/index.html @@ -0,0 +1,115 @@ +--- +title: counter-reset +slug: Web/CSS/counter-reset +tags: + - CSS + - CSS プロパティ + - CSS リスト + - リファレンス +translation_of: Web/CSS/counter-reset +--- +
{{CSSRef}}
+ +

CSScounter-reset プロパティは、 CSS カウンターを、与えられた値に初期化します。

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

メモ: カウンターの値は CSS の {{cssxref("counter-increment")}} プロパティを使用して増加させたり減少させたりすることができます。

+
+ +

構文

+ +
/* "my-counter" を 0 に設定 */
+counter-reset: my-counter;
+
+/* "my-counter" を -1 に設定 */
+counter-reset: my-counter -1;
+
+/* "counter1" を 1 に、 "counter2" を 4 に設定 */
+counter-reset: counter1 1 counter2 4;
+
+/* より詳細度が低い規則による値の初期化をキャンセル */
+counter-reset: none;
+
+/* グローバル値 */
+counter-reset: inherit;
+counter-reset: initial;
+counter-reset: unset;
+
+ +

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

+ + + +

+ +
+
{{cssxref("custom-ident", "<custom-ident>")}}
+
初期化の対象となる、カウンターの名前です。
+
{{cssxref("<integer>")}}
+
要素が出現するごとに、カウンターを初期化するための値です。与えられない場合、初期値の 0 なります。
+
none
+
カウンターの初期化は行われません。これはより詳細度の低い規則によって定義された counter-reset を上書きするために使用することができます。
+
+ +

形式文法

+ +
{{csssyntax}}
+
+ +

+ +
h1 {
+  counter-reset: chapter section 1 page;
+  /* chapter と page カウンターを 0 に、
+     section カウンターを 1 に設定します。 */
+}
+
+ +

仕様書

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

{{cssinfo}}

+ +

ブラウザーの対応

+ +
+ + +

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

+
+ +

関連情報

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