^ 回到顶部
  • 人生没有定律,每个人都有自己的节奏
  • 本站wordpress建站教程均通过实践后发布,希望对你有帮助,如果有代码出错,请联系站长解决
  • 希望你的坚持,都是因为热爱,而不是因为不甘心
  • 8年wordpress建站经验,5星服务品质
  • 那些不愿意让你吃亏的人,才是真正值得你深交的人,也是值得你付出时间的人
  • 腾讯云3年2核2G新品轻量限时特惠只需408元

css如何给li标签前添加数字

wordpress 网址导航主题 wpsite-p 用到了这个办法,可以使 li 标签前添加逐渐增加的数字,1、2、3、4、5 这样子分线给大家:

.head_new ul{counter-reset:sectioncounter;}
.head_new ul li:before {
    display: inline-block;
    content: counter(sectioncounter);
    counter-increment: sectioncounter;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    border-radius: 50%;
    margin-right: 1em;
    background: #5bc648;
    color: #efe;
    font-size: 14px;
}

效果:wpsite-p 网址导航主题

2 核 2G 限时特惠 396 元/3 年    宝塔建站 10850 大礼包

赠人玫瑰,手有余香。