---
# System prepended metadata

title: CSS before 或 after 計算數字
tags: [Css]

---

---
tags: Css
---
# CSS before 或 after 計算數字

```css
ul {
    counter-reset: listStyle;
}

ul li {
    margin-left: 1em;
    counter-increment: listStyle;
}

ul li::before {
    margin-right: 1em;
    content: counter(listStyle);
    /*英文 content: counter(listStyle, lower-alpha); */
}
```