列表样式类型是否有 CSS 计数器等价物?

Is there a CSS counter equivalent for list-style-type?

CSS 有一个很好的 list-style-type 值集合,有没有办法将它们用作 content: counter(steps) 的值?

我想在计数器值中使用 list-style-type: persian

结果将是:

۱ // (one)
۲ // (two)
۳ // (three)
۴ // (four)
۵ // (five)
...

是的,counter() function takes the style type as a parameter。语法如下:

counter() = counter( <ident> [, [ <counter-style> | none ] ]? )

body {
  counter-reset: divs;
}
div {
  counter-increment: divs;
}
div:before {
  content: counter(divs, persian);
}
<div>Text</div>
<div>Text</div>
<div>Text</div>
<div>Text</div>
<div>Text</div>