| <!doctype html> |
| <title>CSS Lists: counters instantiating</title> |
| <link rel="author" title="Daniil Sakhapov" href="mailto:sakhapov@chromium.org"> |
| <link rel="help" href="https://www.w3.org/TR/css-lists-3/#instantiating-counters"> |
| <link rel="match" href="counters-006-ref.html"> |
| <style type="text/css"> |
| * { |
| padding: 0; |
| margin: 0; |
| } |
| |
| .test { |
| counter-increment: section; |
| counter-reset: multilevel; |
| } |
| |
| ol[multilevel] > li::before { |
| content: counter(section) "." counters(multilevel, ".") "."; |
| counter-increment: multilevel; |
| } |
| |
| ol[multilevel] { |
| list-style: none !important; |
| clear: both; |
| } |
| </style> |
| <div class="test"></div> |
| <ol multilevel="multilevel"> |
| <li>1.1</li> |
| <li>1.2</li> |
| <li>1.3</li> |
| </ol> |
| <div class="test"></div> |
| <ol multilevel="multilevel"> |
| <li>2.1</li> |
| <li>2.2</li> |
| <li>2.3</li> |
| </ol> |