Can ordered list produce result that looks like 1.1, 1.2, 1.3 (instead of just 1, 2, 3, …) with css?

后端 未结 11 1005
广开言路
广开言路 2020-11-22 10:13

Can an ordered list produce results that looks like 1.1, 1.2, 1.3 (instead of just 1, 2, 3, ...) with CSS? So far, using list-style-type:decimal has produced on

11条回答
  •  萌比男神i
    2020-11-22 10:43

    I needed to add this to the solution posted in 12 as I was using a list with a mixture of ordered list and unordered lists components. content: no-close-quote seems like an odd thing to add I know, but it works...

    ol ul li:before {
        content: no-close-quote;
        counter-increment: none;
        display: list-item;
        margin-right: 100%;
        position: absolute;
        right: 10px;
    }
    

提交回复
热议问题