你能帮我用 css 自动编号来表示我的“标题标题”和“副标题标题”吗?因为我只需要使用 h1,h2 而不是 ol,ul,li 的标题...
这是我的代码:
<style>
h1,h2 { display: list-item; list-style-position: inside; }
</style>
<div id="page">
<h1>Heading Title</h1>
<h2>Subheading Title</h2>
<h2>Subheading Title</h2>
<h1>Heading Title</h1>
<h2>Subheading Title</h2>
<h1>Heading Title</h1>
</div>
Run Code Online (Sandbox Code Playgroud)
提前致谢