2017-03-01 30 views
1

是否有可能繼續使用css在單獨的ul/ol塊中編號? 1 2 3 4 5 6 ....單獨的ul/ol塊

ol { 
 
    counter-reset: section; 
 
    list-style-type: none; 
 
} 
 

 
li::before { 
 
    counter-increment: section; 
 
    content: counters(section,".") " "; 
 
}
<ol> 
 
    <li>item</li> 
 
    <li>item</li> 
 
    <li>item</li> 
 
    <li>item</li> 
 
</ol> 
 

 
<ol> 
 
    <li>item</li> 
 
    <li>item</li> 
 
</ol>

回答

1

使用此:

<ol> 
    <li>item</li> 
    <li>item</li> 
    <li>item</li> 
</ol> 
// use start number you want as below 
<ol start="50"> 
    <li>item</li> 
    <li>item</li> 
    <li>item</li> 
</ol>