1. counter-reset
      counter-reset:counter1  /* 重置计数器为 0 */
    counter-reset:counter1 0 /* 重置计数器为 0 */
    counter-reset:counter1 -1 /* 重置计数器1为 -1 */
    counter-reset:counter1 1 counter2 2 /* 重置计数器1为 1 计数器2 为 2 */
  2. counter-increment
      counter-increment:counter1  /*  增量为 1 */
    counter-increment:counter1 0 /* 增量为 0 */
    counter-increment:counter1 -1 /* 增量为 -1 */
    counter-increment:counter1 5 /* 增量为 5 */
    counter-increment:counter1 1 counter2 2 /* counter1增量为 1 counter2 增量为2 */
  3. counter counters
    • counter(name),counter(name,style) // style 默认是decimal
    • counters(name,string),counters(name,string,style) // style 默认是decimal

应用

  1. 计数
          .container {
    counter-reset: counter1;
    }
    h2::before {
    counter-increment: counter1;
    content: "Setion " counter(counter1) " : ";
    }
      <div class="container">
    <h2>one </h2> <!-- Setion 1 : -->
    <h2>two </h2> <!-- Setion 2 : -->
    <h2>three </h2>
    <h2>four </h2>
    <h2>five </h2>
    <h2>six </h2>
    </div>
  2. 嵌套计数
         ol {
    list-style-type: none;
    counter-reset: li;
    }
    li::before {
    counter-increment: li;
    content: counters(li,".") " ";
    }
     <div class="list">
    <ol>
    <li>content</li> <!-- 1 -->
    <li> content
    <ol>
    <li>details</li> <!-- 2.1 -->
    </ol>
    </li>
    </ol>

counter counters 计数器的更多相关文章

  1. Histats安装Counter网站计数器 - Blog透视镜

    Histats提供十分多样性的Counter网站计数器,可以依照你个人的喜好与需求,选择适合的Counter网站计数器,也可以针对同一网站,安装多个Counter网站计数器,作法其实比注册账号时更简单 ...

  2. Histats申请Counter网站计数器 - Blog透视镜

    为了计算网页被浏览的次数,访客人数等统计数据,作为未来分析之用,可以向Histats申请免费的Counter网站计数器,它的功能相当齐全,同时也会保留一段时间的资料,当作统计比较的资料,更可以进一步付 ...

  3. Cassandra 计数器counter类型和它的限制

    文档基础 Cassandra 2.* CQL3.1 翻译多数来自这个文档 更新于2015年9月7日,最后有参考资料 作为Cassandra的一种类型之一,Counter类型算是限制最多的一个.Coun ...

  4. counter 计数器

    包含了两个属性和一个方法: 1. counter-reset 2. counter-increment 3. counter()/counters()   counter-reset(主要作用就是给计 ...

  5. 028_MapReduce中的计数器Counter的使用

    一.分析运行wordcount程序屏幕上打印信息 ##运行wordcount单词频率统计程序,基于输出输出路径. [hadoop@hadoop-master hadoop-1.2.1]$ hadoop ...

  6. CSS counter计数器(content目录序号自动递增)详解

    一.CSS计数器三角关系 CSS计数器只能跟content属性在一起的时候才有作用,而content属性貌似专门用在before/after伪元素上的.于是,就有了,“计数器↔伪元素↔content属 ...

  7. 计数器:counter

    组成:2属性,1方法 属性1: counter-reset 命名 属性2: counter-increment 启动/自增 方法 : counter()/counters() 调用方法 1.计数器 命 ...

  8. Python_Day_05 计数器(counter),有序字典(OrderDict),默认字典(defaultdict),可命名元祖(namedtuple),双向队列(deque),单项队列(deuqe.Queue)

    Counter(计数器) 是一个字典的子类,存储形式同样为字典,其中存储的键为字典的元素,值为元素出现的次数,在使用之前我们需要先导入文件 import collections 初始化一个计数器 im ...

  9. 计数器(counter),有序字典(OrderDict),默认字典(defaultdict),可命名元祖(namedtuple),双向队列(deque),单项队列(deuqe.Queue)

    Python_Day_05 计数器(counter),有序字典(OrderDict),默认字典(defaultdict),可命名元祖(namedtuple),双向队列(deque),单项队列(deuq ...

随机推荐

  1. MFC俄罗斯方块

    经典俄罗斯方块游戏 源码百度云链接 链接:https://pan.baidu.com/s/14frk2EuFoiRCzudol2Xgvg提取码:syzk GitHub https://github.c ...

  2. Python第十五天 datetime模块 time模块 thread模块 threading模块 Queue队列模块 multiprocessing模块 paramiko模块 fabric模块

    Python第十五天  datetime模块 time模块   thread模块  threading模块  Queue队列模块  multiprocessing模块  paramiko模块  fab ...

  3. SQL Server系统视图sys.master_files不能正确显示数据库脱机状态

    最近发现在SQL Server数据库(目前测试过SQL Server 2008, 2012,2014,2016各个版本)中,即使数据库处于脱机(OFFLINE)状态,但是sys.master_file ...

  4. gradle 编译war包出现乱码,设置为utf-8格式

    1.找gradle 安装目录下的 gradle 2.修改 DEFAULT_JVM_OPTS="-Dfile.encoding=UTF-8"

  5. Python Learning: 03

    An inch is worth a pound of gold, an inch of gold is hard to buy an inch of time. Slice When the sca ...

  6. Elastic Stack-Elasticsearch使用介绍(二)

    一.前言     写博客,更要努力写博客! 二.Mapping介绍 Mapping类似于数据库中的表结构的定义:这里我们试想一下表结构定义需要那些: 1.字段和字段类型,在Elasticsearch中 ...

  7. 【网站公告】请大家不要发表任何涉及“得到App”的内容

    大家好,今天我们收到来自杭州某某网络科技有限公司的维权骑士团队的邮件,说他们受某某(天津)文化传播有限公司委托,展开维权.园子里有些博主因为学习“得到App”的课程在博客中记了一些笔记,也被维权. 为 ...

  8. BSScrollViewEdgePop

    https://blog.csdn.net/qq_17190231/article/details/84201956 2018年11月18日 16:52:39 FreeBaiShun 阅读数:66 标 ...

  9. Scrapy:腾讯招聘整站数据爬取

    项目地址:https://hr.tencent.com/ 步骤一.分析网站结构和待爬取内容 以下省略一万字 步骤二.上代码(不能略了) 1.配置items.py import scrapy class ...

  10. centos7和centos6通过yum安装JDK1.8

    centos7和centos6通过yum安装JDK1.8 查看JDK的安装路径# java -version============================查看Linux系统版本信息# cat ...