counter counters 计数器
- 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 */
- 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 */
- counter counters
- counter(name),counter(name,style) // style 默认是decimal
- counters(name,string),counters(name,string,style) // style 默认是decimal
应用
- 计数
.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>
- 嵌套计数
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 计数器的更多相关文章
- Histats安装Counter网站计数器 - Blog透视镜
Histats提供十分多样性的Counter网站计数器,可以依照你个人的喜好与需求,选择适合的Counter网站计数器,也可以针对同一网站,安装多个Counter网站计数器,作法其实比注册账号时更简单 ...
- Histats申请Counter网站计数器 - Blog透视镜
为了计算网页被浏览的次数,访客人数等统计数据,作为未来分析之用,可以向Histats申请免费的Counter网站计数器,它的功能相当齐全,同时也会保留一段时间的资料,当作统计比较的资料,更可以进一步付 ...
- Cassandra 计数器counter类型和它的限制
文档基础 Cassandra 2.* CQL3.1 翻译多数来自这个文档 更新于2015年9月7日,最后有参考资料 作为Cassandra的一种类型之一,Counter类型算是限制最多的一个.Coun ...
- counter 计数器
包含了两个属性和一个方法: 1. counter-reset 2. counter-increment 3. counter()/counters() counter-reset(主要作用就是给计 ...
- 028_MapReduce中的计数器Counter的使用
一.分析运行wordcount程序屏幕上打印信息 ##运行wordcount单词频率统计程序,基于输出输出路径. [hadoop@hadoop-master hadoop-1.2.1]$ hadoop ...
- CSS counter计数器(content目录序号自动递增)详解
一.CSS计数器三角关系 CSS计数器只能跟content属性在一起的时候才有作用,而content属性貌似专门用在before/after伪元素上的.于是,就有了,“计数器↔伪元素↔content属 ...
- 计数器:counter
组成:2属性,1方法 属性1: counter-reset 命名 属性2: counter-increment 启动/自增 方法 : counter()/counters() 调用方法 1.计数器 命 ...
- Python_Day_05 计数器(counter),有序字典(OrderDict),默认字典(defaultdict),可命名元祖(namedtuple),双向队列(deque),单项队列(deuqe.Queue)
Counter(计数器) 是一个字典的子类,存储形式同样为字典,其中存储的键为字典的元素,值为元素出现的次数,在使用之前我们需要先导入文件 import collections 初始化一个计数器 im ...
- 计数器(counter),有序字典(OrderDict),默认字典(defaultdict),可命名元祖(namedtuple),双向队列(deque),单项队列(deuqe.Queue)
Python_Day_05 计数器(counter),有序字典(OrderDict),默认字典(defaultdict),可命名元祖(namedtuple),双向队列(deque),单项队列(deuq ...
随机推荐
- spring mvc 在上传图片时,浏览器报The request sent by the client was syntactically incorrect
项目中,在一个jsp页面里其它图片上传是功能是可以使用的,当我自己新加了一个图片上传时,提交表单后,浏览器报The request sent by the client was syntactical ...
- Postman学习之【压力测试】
Postman请自行下载 下面是在网上随便抓了一个请求地址来做演示,把请求地址填入地址栏,此请求为GET请求.点击Send发送请求,请求结果将会在下方显示出来.每次的请求历史数据,会被记录下来,但是经 ...
- 配置MySQL的数据源
首先查看自己是否有这个驱动 有就进行以下操作,没有那就找下载 安装mysql-for-visualstudio 1)双击 mysql-for-visualstudio-2.0.5.msi 2)点击 ...
- 报错TypeError: $(...).live is not a function解决方法
报错的原因是这个方法在jquery1.7以后就被废除了, 1.7以后的版本改用.on()方法 之前的用法: .live(events, function) 新方法: .on(eventType, se ...
- 西湖论剑2019-msc之奇怪的TTL
msc1给了一串很长的TTL字符,参考一些隐写的文章,猜测是在ttl中藏了信息,题目是这样的 我们截获了一些IP数据报,发现报文头中的TTL值特别可疑,怀疑是通信方嵌入了数据到TTL,我们将这些TTL ...
- 基于GDAL库,读取海洋风场数据(.nc格式)c++版
经过这一段时间的对海洋数据的处理,接触了大量的与海洋相关的数据,例如海洋地形.海洋表面温度.盐度.湿度.云场.风场等数据,除了地形数据是grd格式外,其他的都是nc格式的数据.本文将以海洋风场数据为例 ...
- Python-语法模板大全(常用)
目录 1.怎么存数据 变量: 字符串: 不可变对象 列表: 元组: 字典: 三大容器的遍历方法 2.怎么用数据 数字操作符: 判断循环: 3.函数 4. Python核心编程 4.1. 列表生成器 5 ...
- 【js】字符串方法
let str = 'na'; console.log(str.repeat('3'));//nanana console.log(str.startsWith('n'));//true consol ...
- css display和vertical-align 属性
display 定义和用法 display 属性规定元素应该生成的框的类型. 实例 <html> <head> <style type="text/css&qu ...
- 你所不知道的ASP.NET Core MVC/WebApi基础系列(一)
前言 最近发表的EF Core貌似有点多,可别误以为我只专攻EF Core哦,私下有时间也是一直在看ASP.NET Core的内容,所以后续会穿插讲EF Core和ASP.NET Core,别认为你会 ...