File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -613,6 +613,22 @@ counters. (We assume the style sheet as given in the example above).
613613</pre>
614614</div>
615615
616+ <div class="example">
617+ <p>Another example, showing how scope works when counters are used on
618+ elements that are not tested, is the following. This shows how the
619+ style rules given above to number chapters and sections would apply to
620+ the markup given.
621+
622+ <pre>
623+ <body> <!-- (set chapter to 0 | -->
624+ <h1>About the CSS 2.1 Specification</h1> <!-- increment chapter (=1) | (set section to 0 -->
625+ <h2>CSS 2.1 vs CSS 2</h2> <!-- | increment section (=1) -->
626+ <h2>Reading the specification</h 2> <!-- | increment section (=2) -->
627+ <h1>Introduction to CSS 2.1</h1> <!-- increment chapter (=2) | )(set section to 0 -->
628+ </body> <!-- | ) -->
629+ </pre>
630+ </div>
631+
616632<p>The 'counters()' function generates a string composed of all of the
617633counters with the same name that are in scope, separated by a given
618634string.
You can’t perform that action at this time.
0 commit comments