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. 【English】七、常见动词

    一.动词: touch.hear.say.listen touch [tʌtʃ] 触摸 I touch the cat. They touch the elephant. hear  [hɪr] 听到 ...

  2. 【English】三、以o结尾单词变复数

    一.以O结尾的词,许多加es构成复数,特别是一些常用词如: potatoes      土豆 tomatoes     西红柿 echoes 回声 tornadoes    龙卷风 torpedoes ...

  3. Jenkins 配置GitLab插件和Git插件

    本文演示如何在安装完Jenkins之后,配置GitLab插件和Git插件. 1 安装插件 浏览器登录Jenkins Web UI,点击系统管理,再点击管理插件,切换到可选插件,分别搜索GitLab P ...

  4. sql面试 查找每个班级的前5名学生(取分类数据的前几条数据)

    关键字PARTITION BY 自己看代码喽~ SELECT * FROM ( SELECT ROW_NUMBER() OVER (PARTITION BY ClassType ORDER BY Sc ...

  5. django xadmin 1不在可用的选项中

    报错:1不在可用的选项中 解决办法: 对CharField的choices的选项, gender = models.CharField(max_length=, choices=((, , " ...

  6. Redis笔记-集群搭建

    Redis单机版搭建上一篇已经基本介绍了,下面讨论Redis集群搭建方案和示例. 1.关于Redis常用的集群方案(三种): a.一主多从,如一个Master.两个Slave b.薪火相传,即集群中的 ...

  7. 001_python实现数据分析

    一. # coding:utf8 # !/usr/bin/python # import numpy as np import pandas as pd import np def example2( ...

  8. Neutron vxlan network--L2 Population

    L2 Population 是用来提高 VXLAN 网络 Scalability 的.   通常我们说某个系统的 Scalability 好,其意思是: 当系统的规模变大时,仍然能够高效地工作. L2 ...

  9. Divide Candies CodeForces - 1056B (数学)

    Arkady and his friends love playing checkers on an n×nn×n field. The rows and the columns of the fie ...

  10. 工具(4): Git自助手册

    目录: ** 0x01 基础教程/0x02 分支流程/0x03 提交日志/0x04 变化比较/0x05 团队协作/0x06 高级用法/0x07 常见问题(FAQ)/0x08 掌握Git的秘诀 0x01 ...