CSS には の値の素晴らしいコレクションがあります。list-style-type
それらを の値として使用する方法はありcontent: counter(steps)
ますか?
list-style-type: persian
対価で使いたい。
結果は次のようになります。
۱ // (one)
۲ // (two)
۳ // (three)
۴ // (four)
۵ // (five)
...
CSS には の値の素晴らしいコレクションがあります。list-style-type
それらを の値として使用する方法はありcontent: counter(steps)
ますか?
list-style-type: persian
対価で使いたい。
結果は次のようになります。
۱ // (one)
۲ // (two)
۳ // (three)
۴ // (four)
۵ // (five)
...
はい、counter()
関数はスタイル タイプをパラメーターとして受け取ります。構文は次のとおりです。
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>