문제

Is it possible to lose the dot when using "list-style-type:decimal-leading-zero;"

I found a solution to lose the dot, but then I can't add the leading zero.

ol { 
    counter-reset: item;
    list-style-type: decimal-leading-zero;
}
li { display: block; }
li:before { 
    content: counter(item) "  "; 
    counter-increment: item 
}
도움이 되었습니까?

해결책

You can set the list-style-type for the counter:

ol { 
    counter-reset: item;
    list-style-type: none;
}
li { display: block; }
li:before { 
    content: counter(item, decimal-leading-zero) " "; 
    counter-increment: item;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top