自定义排序列表格式 [英] Custom ordered list format

查看:112
本文介绍了自定义排序列表格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用有序列表< ol> ,并且每个列表项< li> 输出为1 。2. 3. ... etc,我想输出为1)2)3)...等,这可以做到吗?

I tried to use ordered list <ol> and each list item <li> outputs as 1. 2. 3. ... etc, I want the output to be 1) 2) 3) ... etc, can this be done?

推荐答案

ol {
  counter-reset: listCounter;
}
ol li {
  counter-increment: listCounter;
}
ol li:before {
  content: counter(listCounter) ")";
}

这篇关于自定义排序列表格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆