marker-counter-ref.html (742B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 4 <title>CSS Lists reference: use of `counter-*` in ::marker</title> 5 6 <link rel="author" href="mailto:jkew@mozilla.com"> 7 8 <style> 9 ol { 10 padding-left: 5em; 11 } 12 li:nth-child(1)::marker { 13 content: "[1] "; 14 } 15 li:nth-child(2)::marker { 16 content: "[2] "; 17 } 18 li:nth-child(3)::marker { 19 content: "[10] "; 20 } 21 li:nth-child(4)::marker { 22 content: "[11] "; 23 } 24 li:nth-child(5)::marker { 25 content: "[12] "; 26 } 27 li:nth-child(6)::marker { 28 content: "[12:1] "; 29 } 30 li:nth-child(7)::marker { 31 content: "[13] "; 32 } 33 li:nth-child(8)::marker { 34 content: "[14] "; 35 } 36 </style> 37 38 <ol> 39 <li>one 40 <li>two 41 <li class=set>set to 10 42 <li>next item 43 <li>next item 44 <li class=reset>reset (12:2) 45 <li>next item 46 <li>last item 47 </ol>