Custom ordered list format

前端 未结 3 1465
清酒与你
清酒与你 2020-12-20 19:36

I tried to use ordered list

    and each list item
  1. outputs as 1. 2. 3. ... etc, I want the output to be 1) 2) 3) ... etc, can thi
3条回答
  •  醉话见心
    2020-12-20 20:16

    You can do this with CSS counter and pseudo elements:

    ol li{
        list-style: none;
        counter-increment: myIndex;
    }
    
    ol li:before{
        content:counter(myIndex)") ";
    }
    1. test
    2. test
    3. test
    4. test
    5. test

提交回复
热议问题