JSFiddle - React, Tailwind, and code Playground
by Kang Yuan
HTML
<h1>大标题</h1>
<p>文字1</p>
<p>文字2</p>
<p>文字3</p>
<h1>大标题</h1>
<p>文字1</p>
<p>文字2</p>
<p>文字3</p>
<h1>大标题</h1>
<p>文字1</p>
<p>文字2</p>
<p>文字3</p>
CSS
h1::before{
content:counter(h)'.';
}
h1{
counter-increment:h;
counter-reset:p;
}
p::before{
content:counter(p)'.';
margin-left:40px;
}
p{
counter-increment:p;
}