Custom LI format in HTML?
I want to display list items with a prefix, like:
ML-1. ..........................
...................
ML-2. ........
ML-3. ...................
............
ML-100. .........................
............
Is it possible? I tried to use li:before { content: "ML-" cou开发者_运维知识库nter(item) ". "; }
however it seems like not supported well in many browsers. And I can't make the numbers right aligned.
I'm pretty sure that isn't possible. Your best bet would be to use a blank-styled unordered list and put the prefix in the body of each LI.
You could do that with jQuery. Unless you don't want to have it on the page? Or if you provide a little more details on how you populate the list i could suggest something else
精彩评论