Счетчик средствами CSS, взамен мало кастомизируемого
/*сквозная нумерация для второго уровня*/
dl {
counter-reset: term definition;
}
dt:before {
counter-increment: term;
content: counter(term) ". ";
}
dd:before {
counter-increment: definition;
content: counter(term) "." counter(definition) " ";
}
dl {
counter-reset: term -1;
}
dt:before {
counter-increment: term 3;
content: counter(term) ". ";
}
body {
counter-reset: section; /* Set the section counter to 0 */
}
h3:before {
counter-increment: section; /* Increment the section counter */
content: "Section " counter(section) ": "; /* Display the counter */
}
/*Один счетчик поуровнево, разделитель второй аргумент*/
ol {
counter-reset: item;
list-style: none;
}
li {
display: block;
}
li:before {
counter-increment: item;
content: counters(item, ".") " ";
}
/*это с определением стиля счета*/
li:before {
counter-increment: item;
content: counters(item, ".", lower-roman) " ";
}