counters-multi-001.xht (1001B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Multiple increments and resets</title> 5 <link rel="author" title="L. David Baron" href="https://dbaron.org/"/> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/> 9 <link rel="match" href="counters-multi-000-ref.html" /> 10 <style type="text/css"> 11 12 body { white-space: nowrap; } 13 14 15 body { counter-reset: one 7 two -2; } 16 #one:before { counter-increment: one -6; content: counter(one) } 17 #two:before { counter-increment: dummy two 7 two two -4 silly 7; content: counter(two) } 18 19 </style> 20 </head> 21 <body> 22 23 <p>The following should be identical:</p> 24 25 <div><span id="one"></span><span id="two"></span></div> 26 <div>12</div> 27 28 </body> 29 </html>