| 本帖最后由 却尘 于 2021-12-27 11:00 编辑 
 
 1.在多个标题前加上连续编号 <style type="text/css">  h1:before{    content:counter(mycounter);    } </style> 
 2.在项目编号中追加文字 h1:before{   content:'第'counter(mycounter)'章'; } 
 3.指定编号的样式 例如:使得编号后面带一个"."文字,编号颜色为蓝色,字体大小为42像素。 h1:before{    content:counter(mycounter)'.';    color:blue;    font-size:42px; } 
 4.指定编号的种类 h1:before{   content:counter(mycounter,upper-alpha)'.';   color:blue;   font-size:42px; } 
 5.在字符串两边添加嵌套文字符号 可以使用content属性的open-quote属性值与close-quote属性值在字符串两边添加诸如括号、单引号、双引号之类的嵌套文字符号。 h1:before{   content: open-quote; } h1:after{  content:close-quote; } h1{  quotes:"(" ")"; } 
 
 |