Begin ordered list from 0 in Markdown

后端 未结 4 1241
野趣味
野趣味 2021-02-05 01:57

I\'m new to Markdown. I was writing something like:

#Table of Contents  
0. Item 0  
1. Item 1  
2. Item 2

But that generates:

4条回答
  •  面向向阳花
    2021-02-05 02:37

    Via html: use

      Via CSS:

      ol {
          counter-reset: num -1; // reset counter to -1 (any var name is possible)
      }
      ol li {
          list-style-type: none; // remove default numbers
      }
      ol li:before {
          counter-increment: num; // increment counter
          content: counter(num) ". "; 
      }
      

      FIDDLE

提交回复
热议问题