content-counter-002

content: counter(c, disc)

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: content: counter(c, disc)</title>
 5   <link rel="author" title="L. David Baron" href="http://dbaron.org/">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles">
 9   <style type="text/css">
10 
11   div { white-space: nowrap; }
12 
13 
14   #test { counter-reset: c; color: blue; }
15   #test span { counter-increment: c; }
16   #test span:before { content: counter(c, disc); }
17 
18   </style>
19  </head>
20  <body>
21 
22  <p>There should be a string of 12 blue filled circles below. (A string of
23     12 black circles is provided on the second line for reference.):</p>
24 
25  <div id="test">
26    <span></span>
27    <span></span>
28    <span></span>
29    <span></span>
30    <span></span>
31    <span></span>
32    <span></span>
33    <span></span>
34    <span></span>
35    <span></span>
36    <span></span>
37    <span></span>
38  </div>
39 
40  <div>
41 42 43 44 45 46 47 48 49 50 51 52 53  </div>
54 
55  </body>
56 </html>