css3-page/Overview.html

changeset 7441
2a7cb1ed8232
parent 7439
9d57f98d774f
child 7443
6fdb489623ce
     1.1 --- a/css3-page/Overview.html	Mon Feb 11 17:45:58 2013 -0800
     1.2 +++ b/css3-page/Overview.html	Mon Feb 11 18:46:59 2013 -0800
     1.3 @@ -2062,25 +2062,6 @@
     1.4       content in page-margin boxes. This is useful for maintaining a page
     1.5       count.
     1.6  
     1.7 -    <div class=example>
     1.8 -     <p>The following rules result in the placement of the current page
     1.9 -      number in the middle of the outside margin of each page.
    1.10 -
    1.11 -     <pre>
    1.12 -@page {
    1.13 -margin: 10%;
    1.14 -counter-increment: page;
    1.15 -
    1.16 -@top-center {
    1.17 -  font-family: sans-serif;
    1.18 -  font-weight: bold;
    1.19 -  font-size: 2em;
    1.20 -  content: counter(page);
    1.21 -}
    1.22 -}
    1.23 -</pre>
    1.24 -    </div>
    1.25 -
    1.26      <p>A ‘<code class=property>counter-increment</code>’ within either a
    1.27       page or margin context causes the counter to increment with the
    1.28       generation of each page box.
    1.29 @@ -2101,19 +2082,46 @@
    1.30       break. Use of the counter in this way does not affect the calculation of
    1.31       the counter's value.
    1.32  
    1.33 -    <p>A counter named ‘<a href="#page"><code class=css>page</code></a>’
    1.34 -     is automatically created and incremented on every page of the document.
    1.35 -     Specifically, the UA must automatically create and increment such a
    1.36 -     counter as if ‘<code class=css>@page { counter-increment: page;
    1.37 -     }</code>’ were specified. The implied ‘<a href="#page"><code
    1.38 -     class=css>page</code></a>’ counter is a real counter, and can be
    1.39 -     directly affected using the ‘<code
    1.40 +    <p> A counter named ‘<a href="#page"><code class=css>page</code></a>’
    1.41 +     is automatically created and incremented by 1 on every page of the
    1.42 +     document, unless the ‘<code class=property>counter-increment</code>’
    1.43 +     property in the <a href="#page-context"><i>page context</i></a>
    1.44 +     explicitly specifies a different increment for the ‘<a
    1.45 +     href="#page"><code class=css>page</code></a>’ counter. The implied
    1.46 +     ‘<a href="#page"><code class=css>page</code></a>’ counter is a real
    1.47 +     counter, and can be directly affected using the ‘<code
    1.48       class=property>counter-increment</code>’ and ‘<code
    1.49       class=property>counter-reset</code>’ properties when named explicitly
    1.50       in those properties. It can also be used in the ‘<code
    1.51       class=css>counter()</code>’ and ‘<code
    1.52       class=css>counters()</code>’ function forms.
    1.53  
    1.54 +    <div class=example>
    1.55 +     <p>The following rules result in the placement of the current page
    1.56 +      number in the middle of the outside margin of each page.
    1.57 +
    1.58 +     <pre>
    1.59 +@page {
    1.60 +  margin: 10%;
    1.61 +
    1.62 +  @top-center {
    1.63 +    font-family: sans-serif;
    1.64 +    font-weight: bold;
    1.65 +    font-size: 2em;
    1.66 +    content: counter(page);
    1.67 +  }
    1.68 +}
    1.69 +</pre>
    1.70 +
    1.71 +     <p>Adding the following rule will make all pages even-numbered.
    1.72 +
    1.73 +     <pre>
    1.74 +@page {
    1.75 +  counter-increment: page 2;
    1.76 +}
    1.77 +</pre>
    1.78 +    </div>
    1.79 +
    1.80      <p>Additionally, a counter named ‘<a href="#page"><code
    1.81       class=css>pages</code></a>’ is automatically created by the UA. Its
    1.82       value is always the total number of pages in the document. (In

mercurial