CSS伪类对象before和after的用法实例


插入图像文件

h1.new:after{      content: url("mark_new.png"); }   插入编号 h1:before{      /* 使用自增计数器 */      content: counter(mycounter); } h1{      /* 指定自增计数器 */      counter-increment: mycounter; }   在字符串两边添加嵌套文字符号 h1:before{      content: open-quote;   } h1:after{      content: close-quote; } h1{      quotes: "(" ")"; }