标题自动序号问题

希望能实现一级、二级标题,自动添加序号。例如1、1.1、1.2等。

尝试添加css,但是只能实现一级标题自增效果:

:root {

counter-reset:counter_h1;counter_h2;

}

h1 {

    counter-increment: counter_h1;

    counter-reset:counter_h2;

}

h1::before {

    content: counter(counter_h1)"、";

}

h2 {

     counter-increment: counter_h2;

}

h2::before {

    content: counter(counter_h1)"."counter(counter_h2)"、";

}

2020-03-14 13:09 from g
Comments
Write a Comment
  • Hepochen reply

    @g 不会在正文中提供这个补全,解析的结果未来倒是可以把这个逻辑放出来。

    现在临时的对应方式可以这样,在 『导出 -> 微信公众号主题 -> 微信格式自定义』中,『重组规则』

    参考 https://hepo-1251269909.cos.ap-shanghai.myqcloud.com/2aa117f5d1a35fb37c5a618cc7cb8e98.png

  • Glep reply

    问题解决,虽然每次都要手动刷新一下