MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 122483 of counter-reset

  • Raccourci de la révision : CSS/counter-reset
  • Titre de la révision : counter-reset
  • ID de la révision : 122483
  • Créé :
  • Créateur : Fredchat
  • Version actuelle ? Non
  • Commentaire /* Préparation de la traduction */
Étiquettes : 

Contenu de la révision

{{template.Traduction_en_cours("CSS:counter-reset")}}

{{template.CSSMozExtensionRef()}}

Summary

counter-reset is used to reset CSS Counters to a given value.

  • Applies to: all elements
  • Inherited: no

Syntax

counter-reset: [<identifier> <integer>?]+ | inherit | none

Values

identifier
The name of the counter to reset.
integer
The value to reset the counter to on each occurrence of the element. Defaults to 0 if not given.

You may specify as many counters to reset as you want, each separated by a space.

Related properties

Examples

h1 {
  counter-reset: chapter section 1 page;
  /* Sets the chapter and page counters to 0
     and the section counter to 1. */
}

See also

Interwiki Languages Links

{{ wiki.languages( { "en": "en/CSS/counter-reset", "pl": "pl/CSS/counter-reset" } ) }}

Source de la révision

<p>
{{template.Traduction_en_cours("CSS:counter-reset")}}
</p><p>{{template.CSSMozExtensionRef()}}
</p>
<h3 name="Summary"> Summary </h3>
<p><code>counter-reset</code> is used to reset <a href="fr/CSS_Counters">CSS Counters</a> to a given value.
</p>
<ul><li> Applies to: all elements
</li><li> Inherited: no
</li></ul>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">counter-reset: [&lt;identifier&gt; &lt;integer&gt;?]+ | inherit | none
</pre>
<h3 name="Values"> Values </h3>
<dl><dt>identifier</dt><dd> The name of the counter to reset.
</dd><dt>integer</dt><dd> The value to reset the counter to on each occurrence of the element. Defaults to 0 if not given.
</dd></dl>
<p>You may specify as many counters to reset as you want, each separated by a space.
</p>
<h3 name="Related_properties"> Related properties </h3>
<ul><li> <a href="fr/CSS/counter-increment">counter-increment</a> increases the value of specified <a href="fr/CSS_Counters">CSS Counters</a> by a given amount.
</li></ul>
<h3 name="Examples"> Examples </h3>
<pre>h1 {
  counter-reset: chapter section 1 page;
  /* Sets the chapter and page counters to 0
     and the section counter to 1. */
}
</pre>
<h3 name="See_also"> See also </h3>
<ul><li> <a href="fr/CSS_Counters">CSS Counters</a>
</li></ul>
<p><span class="comment">Interwiki Languages Links</span>
</p>{{ wiki.languages( { "en": "en/CSS/counter-reset", "pl": "pl/CSS/counter-reset" } ) }}
Revenir à cette révision