content-counter-016.xht (1376B)
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: content: counter() error cases</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#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 <link rel="match" href="content-counter-000-ref.xht"/> 10 <meta name="flags" content="invalid"/> 11 <style type="text/css"> 12 13 body { white-space: nowrap; } 14 15 16 #test { counter-reset: c 0 f 1000; } 17 #test span { counter-increment: c; } 18 #test span:before { 19 content: counter(c); 20 content: counter(f, "."); 21 content: counter(f, ".", decimal); 22 content: counter(f, decimal, "."); 23 content: counter(f, decimal, decimal); 24 } 25 26 </style> 27 </head> 28 <body> 29 30 <p>The following two lines should look the same:</p> 31 32 <div id="test"> 33 <span></span> 34 <span></span> 35 <span></span> 36 <span></span> 37 <span></span> 38 <span></span> 39 <span></span> 40 <span></span> 41 <span></span> 42 <span></span> 43 <span></span> 44 <span></span> 45 </div> 46 47 <div> 48 1 49 2 50 3 51 4 52 5 53 6 54 7 55 8 56 9 57 10 58 11 59 12 60 </div> 61 62 </body> 63 </html>