更新时间:2022-12-31 22:44:50
使用@ kingkong的注释,你可以这样做:
Using @kingkong's comment above, you can do something like this:
ul > li:before {
background-color: red;
margin-right: 5px;
padding: 0 5px;
content: counter(index, lower-alpha);
counter-increment:index;
}
li:first-child {
counter-reset:index;
}
ul li {
list-style: none;
}
这里是一个小提琴: http://jsfiddle.net/2ZsQY/