我需要在wordpress主页的wordpress标题旁边添加计数器。 第一篇文章有" 1"第二个有" 2"你可以在设计中检查我的想法(图像attatched)。感谢帮助。
答案 0 :(得分:0)
所以使用一些css很简单:
body {
counter-reset: section; /* Set a counter named 'section', and it`s initial value is 0. */
}
h3::before {
counter-increment: section; /* Increment the value of section counter by 1 */
content: counter(section); /* Display the value of section counter */
}
发现于:https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters