スタイルシートCSS

使用方法 [edit]

元素:before{
content:counter(计数器);
}

示例 [edit]

/*为h2和h3自动添加序号*/
.postBody h2:before
{
  /*内容显示为:计数器h2counter的值转换为中文数字格式+顿号,格式:一、*/
  content: counter(h2counter, cjk-ideographic) ' ';
}
.postBody h2
{
  /*重置计数器h3counter的值*/
  counter-reset: h3counter;
  /*计数器h2counter的值增加1*/
  counter-increment: h2counter;
}


.postBody h3:before
{
  /*内容显示为:计数器h2counter的值+点+计数器h3counter的值,格式:1.1*/
  content: counter(h2counter) "." counter(h3counter) " ";
}
.postBody h3
{
  /*计数器h3counter的值增加1*/
  counter-increment: h3counter;
}

Comment:



(画像の文字列を入力して下さい)

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS