{"id":10148,"date":"2021-10-25T01:19:41","date_gmt":"2021-10-24T17:19:41","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10148"},"modified":"2021-10-28T11:15:01","modified_gmt":"2021-10-28T03:15:01","slug":"css-counter-style","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2021\/10\/css-counter-style\/","title":{"rendered":"CSS @counter-style\u89c4\u5219\u8be6\u7ec6\u4ecb\u7ecd"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10148\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=10148<\/a> \u946b\u7a7a\u95f4-\u946b\u751f\u6d3b<br \/>\n\u672c\u6587\u6b22\u8fce\u5206\u4eab\u4e0e\u805a\u5408\uff0c\u5168\u6587\u8f6c\u8f7d\u5c31\u4e0d\u5fc5\u4e86\uff0c\u5c0a\u91cd\u7248\u6743\uff0c\u5708\u5b50\u5c31\u8fd9\u4e48\u5927\uff0c\u82e5\u6025\u7528\u53ef\u4ee5\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/202110-counter-style.png';if(!\/zhangxinxu\/.test(location.host)){document.body.addEventListener('mousedown',function(){location.href='https:\/\/www.zhangxinxu.com\/wordpress\/?p=10148'});}<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/cover-counter-style.jpg\" width=\"480\" height=\"319\" alt=\"counter-style\u5c01\u9762\u56fe\" class=\"alignright clip thumb size-medium\" \/><\/p>\n<h3>\u4e00\u3001\u6709\u5e8f\u9879\u76ee\u7b26\u53f7\u53d1\u5c55\u5386\u53f2<\/h3>\n<p>\u5728 Web \u4e2d\uff0c\u6709\u5e8f\u9879\u76ee\u7b26\u53f7\uff08\u65e0\u5e8f\u9879\u76ee\u7b26\u53f7\u4e00\u822c\u662f\u539f\u70b9\u3001\u5706\u5708\u3001\u65b9\u5757\u7b49\u56fe\u5f62\uff0c\u975e\u672c\u6587\u8981\u70b9\uff0c\u4e0d\u4e88\u4ecb\u7ecd\uff09\u7684\u53d1\u5c55\u7ecf\u5386\u4e86\u4e0b\u9762\u8fd9\u51e0\u4e2a\u9636\u6bb5\u3002<\/p>\n<h4>1. \u6570\u5b57\u548c\u897f\u65b9\u8bed\u7cfb\u652f\u6301<\/h4>\n<p>\u5728 HTML \u4e2d\uff0c\u9879\u76ee\u7b26\u53f7\u53ef\u4ee5\u4f7f\u7528 <code>type<\/code> \u5c5e\u6027\u6307\u5b9a\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre>&lt;ol type=\"A\"&gt;\r\n    &lt;li&gt;\u7b2c\u4e00\u884c&lt;\/li&gt;\r\n    &lt;li&gt;\u7b2c2\u884c&lt;\/li&gt;\r\n    &lt;li&gt;\u7b2c3\u884c&lt;\/li&gt;\r\n&lt;\/ol&gt;<\/pre>\n<p>\u5b8c\u6574\u652f\u6301\u7684\u5c5e\u6027\u503c\u5305\u62ec\u8fd9\u4e9b\uff1a<\/p>\n<pre>&lt;ol type=\"1\"&gt;\r\n&lt;ol type=\"a\"&gt;\r\n&lt;ol type=\"A\"&gt;\r\n&lt;ol type=\"i\"&gt;\r\n&lt;ol type=\"I\"&gt;\r\n<\/pre>\n<p>\u5bf9\u5e94\u7684\u5e8f\u53f7\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-18_190532.png\" width=\"304\" height=\"160\" alt=\"type\u5c5e\u6027\u6709\u5e8f\u7b26\u53f7\"><\/p>\n<p>\u4e5f\u53ef\u4ee5\u4f7f\u7528 CSS \u5c5e\u6027 <code>list-style-type<\/code> \u6307\u5b9a\u3002<\/p>\n<pre>\/* \u4e9a\u7f8e\u5c3c\u4e9a *\/\r\nlist-style-type: armenian;\r\n\/* \u683c\u9c81\u5409\u4e9a *\/\r\nlist-style-type: georgian;\r\n\/* \u5341\u8fdb\u5236 *\/\r\nlist-style-type: decimal;\r\n\/* \u5341\u8fdb\u5236\u5e26\u96f6 *\/\r\nlist-style-type: decimal-leading-zero;\r\n\/* \u5c0f\u5199\u5b57\u6bcd *\/\r\nlist-style-type: lower-alpha;\r\n\/* \u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd *\/\r\nlist-style-type: lower-greek;\r\n\/* \u5c0f\u5199\u62c9\u4e01\u5b57\u6bcd *\/\r\nlist-style-type: lower-latin;\r\n\/* \u5c0f\u5199\u7f57\u9a6c\u5b57\u6bcd *\/\r\nlist-style-type: lower-roman;\r\n\/* \u5927\u5199\u5b57\u6bcd *\/\r\nlist-style-type: upper-alpha;\r\n\/* \u5927\u5199\u5e0c\u814a\u5b57\u6bcd *\/\r\nlist-style-type: upper-greek;\r\n\/* \u5927\u5199\u62c9\u4e01\u5b57\u6bcd *\/\r\nlist-style-type: upper-latin;\r\n\/* \u5927\u5199\u7f57\u9a6c\u5b57\u6bcd *\/\r\nlist-style-type: upper-roman;\r\n<\/pre>\n<p>\u5bf9\u5e94\u7684\u6548\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff08\u5de6\u6216\u4e0a\u4e3a IE \u6d4f\u89c8\u5668\u3001\u53f3\u6216\u4e0b\u662f Chrome \u6d4f\u89c8\u5668\uff09\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-18_202716.png\" width=\"325\" alt=\"390\" alt=\"IE\u6d4f\u89c8\u5668\u4e0b\u7684\u6709\u5e8f\u7b26\u53f7\"> <img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-18_202753.png\" width=\"326\" alt=\"409\" alt=\"Chrome\u6d4f\u89c8\u5668\u4e0b\u7684\u6709\u5e8f\u7b26\u53f7\"><\/p>\n<p>\u540e\u6765\u968f\u7740\u4e92\u8054\u7f51\u53d1\u5c55\uff0cWeb \u9875\u9762\u904d\u5e03\u5168\u7403\uff0c\u897f\u65b9\u8bed\u7cfb\u7684\u90a3\u4e9b\u5e8f\u53f7\u5c31\u4e0d\u591f\u7528\u4e86\u3002<\/p>\n<p>\u6bd4\u65b9\u8bf4\u4e16\u754c\u4e0a\u4e0a\u7f51\u8bed\u8a00\u6240\u591a\u7684\u5c31\u662f\u4e2d\u6587\uff0c\u4f46\u662f\u4e2d\u6587\u5c45\u7136\u4e0d\u914d\u6709\u81ea\u52a8\u9012\u589e\u5e8f\u53f7\uff0c\u8fd9\u4e2a\u50cf\u8bdd\u5417\uff1f<\/p>\n<p>\u4e8e\u662f\uff0c\u6709\u5e8f\u9879\u76ee\u7b26\u53f7\u7684\u53d1\u5c55\uff0c\u8fdb\u5165\u4e0b\u4e00\u4e2a\u9636\u6bb5\uff0c\u5373\u5176\u4ed6\u5e38\u89c1\u8bed\u7cfb\u7684\u652f\u6301\u3002<\/p>\n<h4>2. \u5176\u4ed6\u8bed\u8a00\u7cfb\u7edf\u7684\u652f\u6301<\/h4>\n<p>\u8fd9\u91cc\u7684\u8bed\u8a00\u7cfb\u7edf\u5c31\u5f88\u591a\u5566\uff0c\u4e2d\u6587\u65e5\u6587\u97e9\u6587\uff0c\u7b80\u4f53\u7e41\u4f53\uff0c\u8fd8\u6709\u4e00\u4e9b\u751f\u50fb\u7684\u538b\u6839\u6ca1\u542c\u8fc7\u7684\uff0c\u4f8b\u5982\uff1a<\/p>\n<p>\u963f\u62c9\u4f2f-\u5370\u5ea6\u8bed\uff08arabic-indic\uff09\u3001\u5b5f\u52a0\u62c9\u8bed &#8211; bengali\u3001\u67ec\u57d4\u5be8\u8bed &#8211; cambodian\u3001\u68b5\u8bed &#8211; devanagari\u3001\u57c3\u585e\u4fc4\u6bd4\u4e9a\u8bed &#8211; ethiopic\u3001\u53e4\u5409\u62c9\u7279\u8bed &#8211; gujarati\u3001\u679c\u9c81\u7a46\u5947\u8bed &#8211; gurmukhi\u3001\u5361\u7eb3\u8fbe\u8bed &#8211; kannada\u3001\u9ad8\u68c9\u8bed &#8211; khmer\u3001\u8001\u631d\u8bed &#8211; lao\u3001\u9a6c\u62c9\u4e9a\u62c9\u59c6\u8bed &#8211; malayalam\u3001\u8499\u53e4\u8bed &#8211; mongolian\u3001\u7f05\u7538\u8bed &#8211; myanmar\u3001\u4e1c\u5370\u5ea6-\u96c5\u5229\u5b89\u6ce2\u65af\u8bed\uff08oriya\uff09\u3001\u6ce2\u65af\u8bed &#8211; persian\u3001\u6cf0\u5362\u56fa\u8bed &#8211; telugu\u3001\u6cf0\u56fd\u8bed &#8211; thai\u3001\u85cf\u8bed &#8211; tibetan\u3001\u4e4c\u5c14\u90fd\u8bed &#8211; urdu\u7b49\u3002<\/p>\n<p>\u6bd4\u65b9\u8bf4\u679c\u9c81\u7a46\u5947\u8bed\uff08gurmukhi\uff09\u7684\u5e8f\u53f7\u5c31\u662f\u4e0b\u9762\u8fd9\u6837\u7684\uff08\u5b9e\u65f6\u6e32\u67d3\u6548\u679c\uff09\uff1a<\/p>\n<ol style=\"list-style-type: gurmukhi;\">\n<li>\u7b2c\u4e00\u884c<\/li>\n<li>\u7b2c2\u884c<\/li>\n<li>\u7b2c3\u884c<\/li>\n<\/ol>\n<p>\u622a\u56fe\u6548\u679c\u8fd9\u6837\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-20_203518.png\" width=\"89\" height=\"77\" alt=\"\u679c\u9c81\u7a46\u5947\u8bed\u5e8f\u53f7\u6548\u679c\"><\/p>\n<p>\u60f3\u8981\u67e5\u770b\u5176\u4ed6\u8bed\u8a00\u7684\u6709\u5e8f\u5217\u8868\u6548\u679c\uff0c\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202110\/list-style-type-demo.php\" rel=\"noopener\" target=\"_blank\">\u5176\u4ed6\u8bed\u8a00\u7cfb\u7edf\u4e0blist-style\u9879\u76ee\u7b26\u53f7demo<\/a><\/p>\n<p>\u5176\u4e2d\uff0c\u4e2d\u65e5\u97e9\u4e09\u56fd\u8bed\u8a00\u5360\u636e\u7684\u9879\u76ee\u7b26\u53f7\u7c7b\u578b\u9ad8\u8fbe15\u4e2a\u4e4b\u591a\uff0c\u5305\u62ec\uff1a\u4e2d\u65e5\u97e9\u5341\u8fdb\u4f4d\uff08cjk-decimal\uff09\u3001\u4e2d\u65e5\u97e9\u5730\u652f\uff08cjk-earthly-branch\uff09\u3001\u4e2d\u65e5\u97e9\u5929\u5e72\uff08cjk-heavenly-stem\uff09\u3001\u4e2d\u65e5\u97e9\u8868\u610f\u6587\u5b57\uff08cjk-ideographic\uff09\u3001\u65e5\u6587\u6b63\u5f0f\uff08japanese-formal\uff09\u3001\u65e5\u6587\u975e\u6b63\u5f0f\uff08japanese-informal\uff09\u3001\u97e9\u56fd\u97e9\u8bed\u6b63\u5f0f\uff08korean-hangul-formal\uff09\u3001\u97e9\u56fd\u6c49\u5b57\u6b63\u5f0f\uff08korean-hanja-formal\uff09\u3001\u97e9\u56fd\u6c49\u5b57\u975e\u6b63\u5f0f\uff08korean-hanja-informal\uff09\u3001\u7b80\u4f53\u4e2d\u6587\u6b63\u5f0f\uff08simp-chinese-formal\uff09\u3001\u7b80\u4f53\u4e2d\u6587\u975e\u6b63\u5f0f\uff08simp-chinese-informal\uff09\u3001\u7e41\u4f53\u4e2d\u6587\u6b63\u5f0f\uff08trad-chinese-formal\uff09\u3001\u7e41\u4f53\u4e2d\u6587\u975e\u6b63\u5f0f\uff08trad-chinese-informal\uff09\u3001\u97e9\u8bed\uff08hangul\uff09\u3001\u97e9\u8bed\u8f85\u97f3\uff08hangul-consonant\uff09\u3002<\/p>\n<p>\u4f8b\u5982\u201c\u5730\u652f\u201d\u53ef\u4ee5\u5b9e\u73b0\u5b50\u4e11\u5bc5\u536f\u5e8f\u53f7\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_211653.png\" width=\"280\" height=\"258\" alt=\"\u5730\u652f\u5e8f\u53f7\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u7136\u800c\uff0c\u867d\u7136\u6269\u5c55\u4e86\u5f88\u591a\u6709\u5e8f\u5217\u8868\u5173\u952e\u5b57\uff0c\u4f46\u662f\u5168\u7403\u90a3\u4e48\u591a\u56fd\u5bb6\uff0c\u90fd\u8981\u679a\u4e3e\u8fc7\u6765\u5417\uff1f<\/p>\n<p>\u56fd\u5bb6\u91cc\u9762\u8fd8\u6709\u90e8\u843d\uff0c\u90e8\u843d\u6709\u81ea\u5df1\u7684\u8bed\u8a00\uff0c\u600e\u4e48\u6837\uff0c\u8981\u4e0d\u8981\u652f\u6301\uff1f<\/p>\n<p>\u4e0d\u652f\u6301\u5c82\u4e0d\u662f\u6b67\u89c6\u90a3\u4e9b\u5c0f\u56fd\uff0c\u6b67\u89c6\u8fd9\u4e9b\u90e8\u843d\u4e0e\u90a6\u90e1\uff1f<\/p>\n<p>\u5c31\u7b97\u6240\u6709\u56fd\u5bb6\u90fd\u652f\u6301\u4e86\uff0c\u8fd8\u6709\u53e4\u4ee3\u8bed\u8a00\u5462\uff1f<\/p>\n<p>\u6bd4\u65b9\u8bf4\u4e2d\u56fd\u53e4\u4ee3\u7684\u5929\u5730\u7384\u9ec4\uff0c\u652f\u4e0d\u652f\u6301\uff1f<\/p>\n<p>\u5982\u679c\u4e0d\u652f\u6301\uff0c\u53e4\u4eba\u5c82\u4e0d\u662f\u4f1a\u6709\u610f\u89c1\uff0c\u4f60\u4eec\u8fd9\u662f\u6b67\u89c6\u6211\u4eec\u53e4\u4eba\uff01<\/p>\n<p>\u597d\u597d\u597d\uff0c\u65e2\u7136\uff0c\u8bed\u8a00\u592a\u591a\uff0c\u5904\u7406\u4e0d\u8fc7\u6765\uff0c\u90a3\u6211\u5c31\u4f7f\u7528\u5927\u62db\uff0c\u76f4\u63a5\u5236\u5b9a\u4e00\u5957\u89c4\u8303\uff0c\u4f60\u4eec\u53bb\u81ea\u5df1DIY\uff0c\u4f60\u4eec\u60f3\u600e\u4e48\u73a9\uff0c\u5c31\u600e\u4e48\u73a9\uff0c\u8001\u5b50\u4e0d\u7ba1\u4e86\u3002<\/p>\n<p>\u8fd9\u4e2a DIY \u5c31\u662f\u672c\u6587\u8981\u4ecb\u7ecd\u7684 <code>@counter-style<\/code> \u89c4\u5219\uff0c\u53ef\u4ee5\u8ba9\u4efb\u610f\u7684\u5b57\u7b26\u4f5c\u4e3a\u6709\u5e8f\u5217\u8868\u7684\u9879\u76ee\u7b26\u53f7\u5448\u73b0\u3002<\/p>\n<p><span class=\"hidden\">\/\/zxx: \u5982\u679c\u4f60\u770b\u5230\u8fd9\u6bb5\u6587\u5b57\uff0c\u8bf4\u660e\u4f60\u73b0\u5728\u8bbf\u95ee\u662f\u4e0d\u662f\u539f\u6587\u7ad9\u70b9\uff0c\u66f4\u597d\u7684\u9605\u8bfb\u4f53\u9a8c\u5728\u8fd9\u91cc\uff1ahttps:\/\/www.zhangxinxu.com\/wordpress\/?p=10148\uff08\u4f5c\u8005\u5f20\u946b\u65ed\uff09<\/span><\/p>\n<h4>3. \u4e16\u754c\u8bed\u8a00\u592a\u591a\uff0c\u81ea\u5df1\u81ea\u5df1\u73a9\u5427<\/h4>\n<p><code>@counter-style<\/code> \u89c4\u5219\u4f7f\u7528\u793a\u610f\uff1a<\/p>\n<pre>@counter-style circled-alpha {\r\n  system: fixed;\r\n  symbols: \u24b6 \u24b7 \u24b8 \u24b9 \u24ba \u24bb \u24bc \u24bd \u24be \u24bf \u24c0 \u24c1 \u24c2 \u24c3 \u24c4 \u24c5 \u24c6 \u24c7 \u24c8 \u24c9 \u24ca \u24cb \u24cc \u24cd \u24ce \u24cf;\r\n  suffix: \" \";\r\n}\r\n\r\n.items {\r\n  list-style: circled-alpha;\r\n}<\/pre>\n<pre>&lt;ol class=\"items\"&gt;\r\n    &lt;li&gt;\u5143\u5b87\u5b99&lt;\/li&gt;\r\n    &lt;li&gt;\u53cc\u5341\u4e00&lt;\/li&gt;\r\n    &lt;li&gt;CSS\u65b0\u4e16\u754c&lt;\/li&gt;\r\n&lt;\/ol&gt;<\/pre>\n<p>\u4f1a\u4ea7\u751f\u5982\u622a\u56fe\u6240\u793a\u7684\u5217\u8868\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-20_204917.png\" width=\"139\" height=\"82\" alt=\"\u81ea\u5b9a\u4e49\u89c4\u5219\u793a\u610f\"><\/p>\n<p>\u5594\u5662\uff0c\u51fa\u73b0\u4e86\uff0c\u51fa\u73b0\u4e86\uff0c\u5b8c\u5168\u81ea\u5b9a\u4e49\u7684\u5e8f\u53f7\uff0c\u8fd9\u4e48\u4e00\u770b\uff0c\u662f\u4e0d\u662f\u8fd8\u633a\u5c4c\u7684\u3002\u4e0b\u9762\uff0c\u5c31\u6765\u597d\u597d\u4e86\u89e3\u4e0b  <code>@counter-style<\/code> \u89c4\u5219\u7684\u8bed\u6cd5\u3002<\/p>\n<h3>\u4e8c\u3001@counter-style\u89c4\u5219\u8bed\u6cd5<\/h3>\n<p><code>@counter-style<\/code> \u89c4\u5219\u7684\u57fa\u672c\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<pre>@counter-style \u4efb\u610f\u81ea\u5b9a\u4e49\u540d\u79f0 {\r\n    \/* \u5177\u4f53\u7684\u89c4\u5219\u7ec6\u8282 *\/    \r\n}<\/pre>\n<p>\u547d\u540d\u8fd9\u5757\uff0c\u867d\u7136\u4e5f\u652f\u6301\u9a7c\u5cf0\u547d\u540d\uff0c\u4f46\u662f\uff0c\u901a\u5e38\u7ea6\u5b9a\u4fd7\u6210\uff0c\u6309\u7167\u884c\u4e1a\u4e60\u60ef\uff0c\u90fd\u662f\u4f7f\u7528\u77ed\u6a2a\u7ebf\u8fde\u63a5\u7684\uff0c\u4f8b\u5982\u63a8\u8350\u4f7f\u7528\uff1a<\/p>\n<pre>@counter-style custom-style {}<\/pre>\n<p>\u800c\u4e0d\u662f\uff1a<\/p>\n<pre>@counter-style customStyle {}<\/pre>\n<p>\u4e0b\u9762\u91cd\u70b9\u8bb2\u4e0b\u5177\u4f53\u7684\u89c4\u5219\u5c5e\u6027\u3002<\/p>\n<h4>\u5177\u4f53\u7684\u89c4\u5219\u5c5e\u6027<\/h4>\n<p>\u5bf9\u4e8e\u6709\u5e8f\u9879\u76ee\u7b26\u53f7\uff0c\u6211\u4eec\u9700\u8981\u54ea\u4e9b\u7ec4\u5408\u5462\uff1f<\/p>\n<p>\u9996\u5148\uff0c\u80af\u5b9a\u8981\u6307\u5b9a\u90fd\u9700\u8981\u54ea\u4e9b\u7b26\u53f7\uff0c\u90a3\uff0c\u8fd8\u6709\u5462\uff1f<\/p>\n<p>\u662f\u4e0d\u662f\u53ef\u4ee5\u6307\u5b9a\u4e0b\u8303\u56f4\uff0c\u6307\u5b9a\u4e0b\u524d\u7f00\u548c\u540e\u7f00\uff0c\u5bf9\u4e0d\u5bf9\uff1f\u8fd8\u53ef\u4ee5\u6307\u5b9a\u9700\u4e0d\u9700\u8981\u8865\u96f6\u4e4b\u7c7b\u7684\uff0c\u8fd8\u6709\u8303\u56f4\u4e0d\u8db3\u7684\u65f6\u5019\u7684\u515c\u5e95\u5904\u7406\u3002<\/p>\n<p><code>@counter-style<\/code> \u89c4\u5219\u5c5e\u6027\u5c31\u662f\u56f4\u7ed5\u4e0a\u9762\u7684\u573a\u666f\u5c55\u5f00\u7684\uff0c\u5177\u4f53\u5305\u62ec\uff1a<\/p>\n<pre>@counter-style counter-style-name {\r\n    system: \u8ba1\u6570\u7cfb\u7edf\r\n    symbols: \u8ba1\u6570\u7b26\u53f7\r\n    additive-symbols: \u9644\u52a0\u7b26\u53f7\r\n    negative: \u8d1f\u6570\u7b26\u53f7\r\n    prefix: \u524d\u7f00\r\n    suffix: \u540e\u7f00\r\n    range: \u8303\u56f4\r\n    pad: \u8865\u5168\r\n    speak-as: \u5982\u4f55\u9605\u8bfb\r\n    fallback: \u5907\u4efd\u8ba1\u6570\u89c4\u5219\r\n}<\/pre>\n<p>\u5176\u4e2d\uff0c<code>speak-as<\/code>\u5927\u5bb6\u53ef\u4ee5\u5ffd\u7565\uff0c\u8fd9\u4e2a\u5c5e\u4e8e\u65e0\u969c\u788d\u8bbf\u95ee\u76f8\u5173\u7684\u5e94\u7528\uff0c\u5927\u5bb6\u76ee\u524d\u65e0\u9700\u4e86\u89e3\u3002<\/p>\n<p>\u81f3\u4e8e\u5176\u4ed6\u51e0\u4e2a\u5c5e\u6027\u8fd8\u90fd\u633a\u6709\u5185\u5bb9\u7684\uff0c\u56e0\u6b64\uff0c\u5355\u72ec\u62ff\u51fa\u6765\u8bb2\u4e0b\u3002<\/p>\n<h3>\u4e09\u3001\u8bf4\u8bf4 system \u5c5e\u6027<\/h3>\n<p><code>system<\/code> \u5c5e\u6027\u8868\u793a\u8ba1\u6570\u7cfb\u7edf\uff0c\u4e5f\u5c31\u662f\u8ba1\u6570\u7528\u7684\u7b97\u6cd5\u3002\u652f\u6301\u4e0b\u9762\u8fd9\u4e9b\u503c\u548c\u7528\u6cd5\uff1a<\/p>\n<pre>\/* \u5173\u952e\u5b57\u503c *\/\r\nsystem: cyclic;\r\nsystem: numeric;\r\nsystem: alphabetic;\r\nsystem: symbolic;\r\nsystem: additive;\r\nsystem: fixed;\r\n\r\n\/* \u7ec4\u5408\u4f7f\u7528\u503c *\/\r\nsystem: fixed 3;\r\nsystem: extends decimal;<\/pre>\n<p>\u4e0b\u9762\u76f4\u63a5\u901a\u8fc7\u6848\u4f8b\u5e26\u5927\u5bb6\u4e86\u89e3\u4e0b\u5404\u4e2a\u5173\u952e\u5b57\u7684\u4f5c\u7528\u3002<\/p>\n<h4>1. cyclic<\/h4>\n<p><code>cyclic<\/code> \u8868\u793a\u5faa\u73af\u4f7f\u7528\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u4e00\u5957\u5b57\u7b26\uff0c\u5373\u5982\u679c\u8ba1\u6570\u5230\u4e86\u672b\u5c3e\uff0c\u4f1a\u4ece\u5934\u7ee7\u7eed\u5f00\u59cb\u3002<\/p>\n<p><code>cyclic<\/code>\u6bd4\u8f83\u9002\u5408\u7528\u5728\u65e0\u5e8f\u5217\u8868\u4e0a\uff0c\u53ea\u9700\u8981\u6307\u5b9a\u4e00\u4e2a\u5b57\u7b26\uff0c\u5c31\u53ef\u4ee5\u65e0\u9650\u5faa\u73af\u4f7f\u7528\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>@counter-style smile {\r\n    system: cyclic;\r\n    symbols: \u263a;\r\n    suffix: \" \";\r\n}\r\nul {\r\n   list-style-type: smile;\r\n}<\/pre>\n<p>\u5c31\u4f1a\u6709\u5982\u4e0b\u56fe\u6240\u793a\u7684\u6548\u679c\uff0c\u9879\u76ee\u7b26\u53f7\u662f\u4e2a\u7b11\u8138\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_215525.png\" width=\"122\" height=\"72\" alt=\"\u7b11\u8138\u4f5c\u4e3a\u9879\u76ee\u7b26\u53f7\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5982\u679c\u6307\u5b9a\u7684\u662f\u591a\u4e2a\u7b26\u53f7\uff0c\u5219\u4f1a\u51fa\u73b0\u8fd9\u51e0\u4e2a\u5b57\u7b26\u4e0d\u65ad\u5faa\u73af\u7684\u8fc7\u7a0b\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>@counter-style even-odd {\r\n    system: cyclic;\r\n    symbols: \u5947 \u5076;\r\n    suffix: \" \";\r\n}\r\nul {\r\n    list-style-type: even-odd;\r\n}<\/pre>\n<p>\u6b64\u65f6\u9879\u76ee\u7b26\u53f7\u5c31\u662f\u5947\u5076\u4e0d\u65ad\u5faa\u73af\uff0c\u770b\u8d77\u6765\u9887\u6709\u70b9\u602a\u5f02\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_220113.png\" width=\"122\" height=\"108\" alt=\"\u5947\u5076\u9879\u76ee\u7b26\u53f7\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<h4>2. alphabetic<\/h4>\n<p><code>alphabetic<\/code> \u8868\u793a\u6309\u5b57\u6bcd\u7f16\u53f7\u7cfb\u7edf\u5c06\u6307\u5b9a\u7b26\u53f7\u89e3\u91ca\u4e3a\u6570\u5b57\u3002\u505a\u591a\u652f\u6301 a &#8211; z \u517126\u4e2a\u82f1\u6587\u5b57\u6bcd\uff0c\u5982\u679c\u987a\u5e8f\u8d85\u8fc7 z\uff08\u6216\u8005\u6307\u5b9a\u5b57\u7b26\u6570\u91cf\uff09\uff0c\u5219\u4f1a\u6309\u7167 &#8220;aa&#8221;, &#8220;ab&#8221;, &#8220;ac&#8221;\u2026 \u7ee7\u7eed\u89e3\u91ca\u9879\u76ee\u7b26\u53f7\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre>@counter-style alphabetic {\r\n    system: alphabetic;\r\n    symbols: \u24d0 \u24d1 \u24d2;\r\n    suffix: \" \";\r\n}\r\nul {\r\n    list-style-type: alphabetic;\r\n}<\/pre>\n<p>\u6b64\u65f6\u4f1a\u6709\u5982\u4e0b\u56fe\u6240\u793a\u7684\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_223205.png\" width=\"106\" height=\"151\" alt=\"alphabetic \u503c\u6548\u679c\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u53e6\u5916\uff0c\u5982\u679c <code>symbols<\/code> \u5b57\u7b26\u662f\u4e0d\u80fd\u76f4\u63a5\u7528\u6570\u5b57\uff0c\u6216\u8005\u662f\u4e71\u4e03\u516b\u7cdf\u7684\u7b26\u53f7\u8868\u793a\u7684\uff0c\u5426\u5219\u81ea\u5b9a\u4e49\u7b26\u53f7\u662f\u65e0\u6548\u7684\uff0c\u4e00\u5b9a\u8981\u52a0\u5f15\u53f7\u624d\u884c\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>\/* \u65e0\u6548 *\/\r\nsymbols: 1 2 3\r\n\r\n* \u6709\u6548 *\/\r\nsymbols: \"1\" \"2\" \"3\"<\/pre>\n<p>\u5982\u679c\u662f\u4e2d\u6587\u6216\u8005\u4e2d\u6587\u5168\u89d2\u6807\u70b9\uff0c\u5219\u4e0d\u9700\u8981\u52a0\u5f15\u53f7\u3002<\/p>\n<h4>3. numeric<\/h4>\n<p><code>numeric<\/code> \u8868\u793a\u4f7f\u7528\u6570\u503c\u7cfb\u7edf\u7b26\u53f7\u8ba1\u6570\u7b97\u6cd5\uff0c\u6b64\u7b97\u6cd5\u548c\u4e0a\u9762\u7684 <code>alphabetic<\/code> \u975e\u5e38\u7c7b\u4f3c\uff0c\u533a\u522b\u5728\u4e8e\uff0c<code>alphabetic<\/code> \u662f\u4ece 1 \u5f00\u59cb\u7684\uff0c\u540e\u9762\u662f 2\u3002\u800c <code>numeric<\/code> \u662f\u4ece 0 \u5f00\u59cb\u7684\uff0c\u540e\u9762\u624d\u662f 1\uff0c \u518d\u7136\u540e\u662f 2.<\/p>\n<p>\u56e0\u6b64\uff0c<code>numeric<\/code> \u503c\u4f7f\u7528\u7684\u65f6\u5019\u9700\u8981\u4fdd\u8bc1\u81f3\u5c11 2 \u4e2a\u5b57\u7b26\u88ab\u6307\u5b9a\u3002<\/p>\n<p>\u6548\u679c\u793a\u610f\uff1a<\/p>\n<pre>@counter-style numeric {\r\n    system: numeric;\r\n    symbols: \u24d0 \u24d1 \u24d2;\r\n    suffix: \" \";\r\n}\r\nul {\r\n    list-style-type: numeric;\r\n}<\/pre>\n<p>\u6b64\u65f6\u4f1a\u6709\u5982\u4e0b\u56fe\u6240\u793a\u7684\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_223646.png\" width=\"106\" height=\"156\" alt=\"numeric \u503c\u6548\u679c\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u7b2c\u4e00\u4e2a\u5b57\u7b26\u662f b\uff0c\u800c\u4e0d\u662f a\uff0c\u5c31\u662f\u56e0\u4e3a a \u5bf9\u5e94\u7684\u662f \u6570\u5b57\u5e8f\u53f7 0\uff0c\u800c\u8ba1\u6570\u6548\u679c\u662f\u4ece 1 \u5f00\u59cb\u7684\u3002<\/p>\n<h4>4. fixed<\/h4>\n<p>\u503c <code>fixed<\/code> \u8868\u793a\u663e\u793a\u7684\u5e8f\u53f7\u5b57\u7b26\u662f\u56fa\u5b9a\u7684\uff0c\u5982\u679c\u8d85\u51fa\uff0c\u4e0d\u4f1a\u5faa\u73af\uff0c\u800c\u662f\u4f7f\u7528\u80cc\u540e\u5bf9\u5e94\u7684\u6570\u5b57\u4ee3\u66ff\u5448\u73b0\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre>@counter-style fixed {\r\n    system: fixed;\r\n    symbols: \u2776 \u2777 \u2778;\r\n}\r\nul {\r\n    list-style: fixed;\r\n}<\/pre>\n<p>\u6d4b\u8bd5\uff0c\u524d3\u4e2a\u6570\u5b57\u4f1a\u4f7f\u7528\u5b9e\u5fc3\u6570\u5b57\u4ee3\u66ff\uff0c\u800c\u540e\u9762\u7684\u7b2c4\u9879\u548c\u7b2c5\u9879\u7531\u4e8e\u6ca1\u6709\u6307\u5b9a\u9879\u76ee\u5b57\u7b26\uff0c\u56e0\u6b64\uff0c\u8fd8\u662f\u4f7f\u7528\u9ed8\u8ba4\u7684\u6570\u5b57\u5e8f\u53f7\u4ee3\u66ff\uff0c\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_224702.png\" width=\"148\" height=\"119\" alt=\"\u5b9e\u8272\u6587\u5b57\u5e8f\u53f7\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p><code>fixed<\/code> \u503c\u8fd8\u652f\u6301\u7ec4\u5408\u7528\u6cd5\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>system: fixed 3;<\/pre>\n<p>\u8868\u793a\u4ece\u7b2c3\u9879\u5f00\u59cb\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u5b57\u7b26\u66ff\u6362\uff0c\u4e8e\u662f\uff0c\u4f1a\u6709\u5982\u4e0b\u622a\u56fe\u5bf9\u5e94\u7684\u6e32\u67d3\u8868\u73b0\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_224857.png\" width=\"146\" height=\"106\" alt=\"\u7ec4\u5408\u503c\u6548\u679c\u622a\u56fe\" class=\"alignnone size-medium\" \/><\/p>\n<h4>5. symbolic<\/h4>\n<p><code>symbolic<\/code> \u8868\u793a\u901a\u8fc7\u5e73\u94fa\u5b57\u7b26\u7684\u65b9\u5f0f\u8fdb\u884c\u9879\u76ee\u7b26\u53f7\u663e\u793a\u3002<\/p>\n<p> \u4f8b\u5982\uff1a<\/p>\n<pre>@counter-style symbolic {\r\n    system: symbolic;\r\n    symbols: \u328e \u328d \u328c;\r\n}\r\nul {\r\n    list-style: symbolic;\r\n}<\/pre>\n<p>\u6548\u679c\u4f1a\u662f\u8fd9\u6837\u7684\uff0c\u91d1\u6728\u6c34\u5b57\u7b26\u4e0d\u65ad\u5e73\u94fa\u91cd\u590d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_225512.png\" width=\"120\" height=\"154\" alt=\"symbolic \u5b57\u7b26\u5e73\u94fa\u91cd\u590d\" class=\"alignnone size-medium\" \/><\/p>\n<h4>6. additive<\/h4>\n<p><code>additive<\/code> \u8868\u793a\u201c\u7b26\u53f7-\u503c\u201d\u7f16\u53f7\u7cfb\u7edf\uff0c\u4e3b\u8981\u7528\u5728\u7f57\u9a6c\u6570\u5b57\u4e0a\uff0c\u56e0\u4e3a\u7f57\u9a6c\u6570\u5b57\u4e0d\u662f\u91cd\u590d\u4f7f\u7528\u4e0d\u540c\u4f4d\u7f6e\u7684\u6570\u5b57\u4ee5\u83b7\u5f97\u4e0d\u540c\u7684\u503c\uff0c\u800c\u662f\u4e3a\u8f83\u5927\u7684\u503c\u5b9a\u4e49\u989d\u5916\u7684\u6570\u5b57\u3002\u5728\u8fd9\u6837\u4e00\u4e2a\u7cfb\u7edf\u4e2d\uff0c\u6570\u5b57\u7684\u503c\u53ef\u4ee5\u901a\u8fc7\u5728\u6570\u5b57\u4e2d\u52a0\u4e0a\u6570\u5b57\u6765\u6c42\u51fa\u6765\u3002<\/p>\n<p>\u5fc5\u987b\u4f7f\u7528\u81f3\u5c11\u4e00\u4e2a\u52a0\u6cd5\u5143\u7ec4\u6307\u5b9a\u540d\u4e3a\u52a0\u6cd5\u7b26\u53f7\u7684\u9644\u52a0\u63cf\u8ff0\u7b26\uff0c\u5426\u5219\u8ba1\u6570\u5668\u6837\u5f0f\u89c4\u5219\u5c06\u65e0\u6548\u3002<\/p>\n<p>additive\u5143\u7ec4\u7c7b\u4f3c\u4e8e\u590d\u5408\u8ba1\u6570\u5668\u7b26\u53f7\uff0c\u5b83\u7531\u4e24\u90e8\u5206\u7ec4\u6210\uff1a\u6b63\u5e38\u8ba1\u6570\u5668\u7b26\u53f7\u548c\u975e\u8d1f\u6574\u6570\u6743\u91cd\u3002\u52a0\u6cd5\u5143\u7ec4\u5fc5\u987b\u6309\u5176\u6743\u91cd\u7684\u964d\u5e8f\u6307\u5b9a\uff0c\u5426\u5219\u7cfb\u7edf\u65e0\u6548\u3002<\/p>\n<p>\u4f7f\u7528\u793a\u610f\uff1a<\/p>\n<pre>@counter-style my-upper-roman {\r\n    system: additive;\r\n    range: 1 3999;\r\n    additive-symbols: 1000 M, 900 CM, 500 D, 400 CD, 100 C, 90 XC, 50 L, 40 XL, 10 X, 9 IX, 5 V, 4 IV, 1 I;\r\n}\r\n.additive {\r\n    list-style: my-upper-roman;\r\n}<\/pre>\n<p>\u63a5\u53ef\u4ee5\u6a21\u62df\u539f\u751f\u7684 <code>list-style:upper-roman<\/code> \u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_231651.png\" width=\"181\" height=\"108\" alt=\"\u5927\u5199\u7f57\u9a6c\u5e8f\u53f7\" class=\"alignnone size-medium\" \/><\/p>\n<p><code>additive<\/code> \u503c\u7279\u522b\u9002\u5408\u8d85\u8fc7\u4e00\u5b9a\u5e8f\u53f7\uff0c\u5c31\u7a81\u7136\u6539\u53d8\u5b57\u7b26\u663e\u793a\u7684\u573a\u666f\u3002<\/p>\n<h4>7. extends<\/h4>\n<p><code>extends<\/code> \u8868\u793a\u6269\u5c55\u81ea\u5176\u4ed6\u5df2\u6709\u7684\u8ba1\u6570\u89c4\u5219\uff0c\u8fd9\u4e2a\u8ba1\u6570\u89c4\u5219\u53ef\u4ee5\u662f\u6d4f\u89c8\u5668\u5185\u7f6e\u7684\uff0c\u4f8b\u5982\u5b57\u7b26\u9012\u589e\uff0c\u6570\u5b57\u9012\u589e\uff0c\u4e2d\u6587\u9012\u589e\u7b49\uff0c\u4e5f\u53ef\u4ee5\u6269\u5c55\u81ea <code>@counter-style<\/code> \u89c4\u5219\u81ea\u5b9a\u4e49\u7684\u8ba1\u6570\u89c4\u5219\u3002<\/p>\n<p>\u4e0b\u9762\u8fd9\u4e2a\u6848\u4f8b\u793a\u610f\u7684\u662f\u6269\u5c55\u6d4f\u89c8\u5668\u5185\u7f6e\u7684\u7532\u4e59\u4e19\u4e01\u4e2d\u6587\u5929\u5e72\u89c4\u5219\u5f04\u7684\u4e2a10\u6708\u65b0\u756a\u6392\u5e8f\uff1a<\/p>\n<pre>@counter-style october-comic {\r\n    system: extends cjk-heavenly-stem;\r\n    prefix: \"[10\u6708\u65b0\u756a]\";\r\n    suffix: \"\u3001\";\r\n}\r\n.extends {\r\n    list-style: october-comic;\r\n    padding-left: 8em;\r\n}<\/pre>\n<p>\u4e3b\u8981\u662f\u81ea\u5b9a\u4e49\u4e86\u524d\u7f00\u548c\u540e\u7f00\uff0c\u6548\u679c\u5c31\u662f\u4e0b\u9762\u8fd9\u6837\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-24_233842.png\" width=\"330\" height=\"110\" alt=\"\u901a\u8fc7\u6269\u5c55\u81ea\u5b9a\u4e49\u65b0\u7684\u8ba1\u6570\u89c4\u5219\" class=\"alignnone size-medium\" \/><\/p>\n<h4>\u4ee5\u4e0a\u6240\u6709\u6848\u4f8bdemo<\/h4>\n<p>\u4ee5\u4e0a\u6240\u6709\u622a\u56fe\u548c system \u503c\u6548\u679c\u5747\u53ef\u4ee5\u4f53\u9a8c\uff0c\u5efa\u8bae Chrome 91+ \u6d4f\u89c8\u5668\u6253\u5f00\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202110\/content-counter-style-system-demo.php\" rel=\"noopener\" target=\"_blank\">@counter-style\u89c4\u5219\u4e0bsystem\u5404\u503cdemo<\/a><\/p>\n<h3>\u56db\u3001\u5173\u4e8e symbols \u548c additive-symbols<\/h3>\n<h4>1. symbols<\/h4>\n<p><code>symbols<\/code> \u5c5e\u6027\u8868\u793a\u9879\u76ee\u7b26\u5408\u5b57\u7b26\u5185\u5bb9\uff0c\u8bed\u6cd5\u4e0a\uff0c\u8fd9\u4e9b\u5b57\u7b26\u53ef\u4ee5\u6709\u5f15\u53f7\uff0c\u4e5f\u53ef\u4ee5\u6ca1\u6709\u5f15\u53f7\uff08\u6570\u5b57\u5fc5\u987b\u52a0\u5f15\u53f7\uff09\u3002<\/p>\n<p>\u4f8b\u5982\u4e0b\u9762\u7684\u8bed\u6cd5\u90fd\u662f\u5408\u6cd5\u7684\uff1a<\/p>\n<pre>symbols: A B C D E;\r\nsymbols: \"\\24B6\" \"\\24B7\" \"\\24B8\" D E;\r\nsymbols: \"0\" \"1\" \"2\" \"4\" \"5\" \"6\" \"7\" \"8\" \"9\";<\/pre>\n<p>\u8fd9\u91cc\uff0c\u987a\u4fbf\u5c55\u793a\u4e0b\u5929\u5e72\u5730\u652f\u5bf9\u5e94\u7684\u8f6c\u4e49\u7f16\u7801\u5427\uff1a<\/p>\n<pre>\/* \u5b50 \u4e11 \u5bc5 \u536f \u8fb0 \u5df3 \u5348 \u672a \u7533 \u9149 \u620c \u4ea5 *\/\r\nsymbols: \"\\5B50\" \"\\4E11\" \"\\5BC5\" \"\\536F\" \"\\8FB0\" \"\\5DF3\" \"\\5348\" \"\\672A\" \"\\7533\" \"\\9149\" \"\\620C\" \"\\4EA5\";<\/pre>\n<pre>\/* \u7532 \u4e59 \u4e19 \u4e01 \u620a \u5df1 \u5e9a \u8f9b \u58ec \u7678 *\/\r\nsymbols: \"\\7532\" \"\\4E59\" \"\\4E19\" \"\\4E01\" \"\\620A\" \"\\5DF1\" \"\\5E9A\" \"\\8F9B\" \"\\58EC\" \"\\7678\";<\/pre>\n<p><code>symbols<\/code> \u5c5e\u6027\u8fd8\u652f\u6301\u4f7f\u7528\u56fe\u50cf\u4f5c\u4e3a\u7b26\u53f7\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>symbols: url('first.svg') url('second.svg') url('third.svg');<\/pre>\n<p>\u4e0d\u8fc7\u76ee\u524d\u6ca1\u6709\u4efb\u4f55\u6d4f\u89c8\u5668\u652f\u6301\u8fd9\u4e00\u7279\u6027\uff0c\u6211\u4f30\u8ba1\u5728\u5f88\u957f\u4e00\u6bb5\u65f6\u95f4\u5185\uff0c\u6d4f\u89c8\u5668\u4e5f\u4e0d\u4f1a\u652f\u6301\u7684\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u5982\u679c system \u5c5e\u6027\u7684\u503c\u662f <code>additive<\/code>\uff0c\u5219<code>symbols<\/code> \u5c5e\u6027\u65e0\u6548\uff0c\u9700\u8981\u4f7f\u7528 <code>additive-symbols<\/code> \u5c5e\u6027\u8868\u793a\u63cf\u8ff0\u7b26\u3002<\/p>\n<h4>2. additive-symbols<\/h4>\n<p><code>additive-symbols<\/code> \u8868\u793a\u5f53\u8ba1\u6570\u503c\u5230\u4e86\u67d0\u4e00\u6307\u5b9a\u503c\u7684\u65f6\u5019\uff0c\u9879\u76ee\u7b26\u53f7\u4f7f\u7528\u5bf9\u5e94\u5b57\u7b26\u4ee3\u66ff\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>additive-symbols: 3 \"0\", 2 \"1\";<\/pre>\n<p>\u8868\u793a\u5217\u8868\u8ba1\u6570\u9700\u8981\u52302\u7684\u65f6\u5019\u9879\u76ee\u7b26\u53f7\u663e\u793a\u5b57\u7b26\u4e32 1\uff0c\u8ba1\u6570\u662f 3 \u7684\u65f6\u5019\u663e\u793a\u9879\u76ee\u7b26\u53f7\u662f 0\u3002<\/p>\n<p><code>additive-symbols<\/code> \u5c5e\u6027\u5fc5\u987b <code>system<\/code> \u5c5e\u6027\u7684\u503c\u662f <code>additive<\/code> \u7684\u65f6\u5019\u4f7f\u7528\u3002<\/p>\n<p>\u540c\u65f6\uff0c\u6ce8\u610f\uff0c\u8ba1\u6570\u5e8f\u53f7\u4e00\u5b9a\u8981\u662f\u5012\u5e8f\u5448\u73b0\u7684\u3002\u4f8b\u5982\uff0c\u4e0b\u9762\u8fd9\u6837\u4e66\u5199\u5c31\u662f\u65e0\u6548\u7684\uff1a<\/p>\n<pre><span style=\"color:green;\">\/* \u65e0\u6548 *\/<\/span>\r\nadditive-symbols:  2 \"1\", 3 \"0\";<\/pre>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5e0c\u671b\u524d3\u540d\u4f7f\u7528\u72b6\u5143\u3001\u699c\u773c\u3001\u63a2\u82b1\u79f0\u547c\u4ee3\u66ff\uff0c\u800c\u4e0d\u662f1,2,3,4,5\uff0c\u5219\u53ef\u4ee5\u8bd5\u8bd5\u4e0b\u9762\u7684\u4ee3\u7801\uff08\u4e5f\u53ef\u4ee5\u4f7f\u7528 fixed \u8ba1\u6570\u7b97\u6cd5\uff09\uff1a<\/p>\n<pre>@counter-style nba-draft {\r\n    system: additive;\r\n    additive-symbols: \u63a2\u82b1 3, \u699c\u773c 2, \u72b6\u5143 1;\r\n    range: 1 3;\r\n}\r\n.draft {\r\n    list-style-type: nba-draft;\r\n}<\/pre>\n<pre>&lt;ul class=\"draft\"&gt;\r\n    &lt;li&gt;\u51ef\u5fb7\u00b7\u574e\u5b81\u5b89\uff08\u6d3b\u585e\uff09&lt;\/li&gt;\r\n    &lt;li&gt;\u6770\u4f26\u00b7\u683c\u6797\uff08\u706b\u7bad\uff09&lt;\/li&gt;\r\n    &lt;li&gt;\u57c3\u6587\u00b7\u83ab\u5e03\u91cc\uff08\u9a91\u58eb\uff09&lt;\/li&gt;\r\n    &lt;li&gt;\u65af\u79d1\u8482\u00b7\u5df4\u6069\u65af\uff08\u731b\u9f99\uff09&lt;\/li&gt;\r\n    &lt;li&gt;\u6770\u4f26\u00b7\u8428\u683c\u65af\uff08\u9b54\u672f\uff09&lt;\/li&gt;\r\n&lt;\/ul&gt;<\/pre>\n<p>\u5c31\u53ef\u4ee5\u5b9e\u73b0\u9884\u671f\u7684\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-25_002157.png\" width=\"182\" height=\"110\" alt=\"\u6307\u5b9a\u524d\u4e09\u540d\u7684\u540d\u79f0\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u773c\u89c1\u4e3a\u5b9e\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202110\/counter-style-additive-symbols-demo.php\" rel=\"noopener\" target=\"_blank\">@counter-style\u89c4\u5219\u4e0badditive-symbols\u5c5e\u6027demo<\/a><\/p>\n<h3>\u4e94\u3001\u524d\u7f00 prefix \u548c\u540e\u7f00 suffix<\/h3>\n<p>\u8fd9\u91cc\u7684\u77e5\u8bc6\u6ca1\u4ec0\u4e48\u597d\u8bf4\u7684\uff0c\u770b\u793a\u4f8b\uff1a<\/p>\n<pre>prefix: \"\u00bb\";\r\nprefix: \"\u9875\u7801 \";\r\nprefix: url(bullet.png);\r\n\r\nprefix: \"\u3001\";\r\nprefix: \"\uff1a\";<\/pre>\n<p>\u652f\u6301\u4efb\u610f\u6570\u91cf\u7684\u5b57\u7b26\uff0c\u652f\u6301\u56fe\u50cf\u7c7b\u578b\u3002<\/p>\n<h3>\u516d\u3001pad \u5b57\u7b26\u8865\u5168<\/h3>\n<p>\u8fd9\u4e2a\u76f4\u63a5\u770b\u4e2a\u4f8b\u5b50\u5c31\u77e5\u9053\u4ec0\u4e48\u610f\u601d\u4e86\uff08\u6848\u4f8b\u6e90\u81ea <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/@counter-style\/pad\" rel=\"noopener\" target=\"_blank\">MDN \u6587\u6863<\/a>\uff09\uff1a<\/p>\n<pre>@counter-style pad-example {\r\n  system: numeric;\r\n  symbols: \"0\" \"1\" \"2\" \"3\" \"4\" \"5\";\r\n  pad: 2 \"0\";\r\n}\r\n\r\n.list {\r\n  list-style: pad-example;\r\n}<\/pre>\n<p>\u7ed3\u679c\u5982\u4e0b\u56fe\uff0c\u6570\u5b57\u524d\u9762\u90fd\u8865\u5145\u4e86\u4e00\u4e2a 0\uff0c\u8fd9\u6837\uff0c\u4fdd\u8bc1\u5b57\u7b26\u4e2a\u6570\u662f 2 \u4f4d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-25_003043.png\" width=\"163\" height=\"102\" alt=\"\u8865\u96f6\u6548\u679c\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<h4>\u8bed\u6cd5<\/h4>\n<p><code>pad<\/code> \u5c5e\u6027\u8bed\u6cd5\u793a\u610f\uff1a<\/p>\n<pre>pad: 3 \"0\";<\/pre>\n<p>\u524d\u9762\u4e00\u4e2a\u6574\u6570\u6307\u9700\u8981\u8865\u5168\u7684\u5b57\u7b26\u4e2a\u6570\uff0c\u540e\u9762\u7684\u5b57\u7b26\u8868\u793a\u9700\u8981\u8865\u5168\u7684\u5b57\u7b26\u3002<\/p>\n<h3>\u4e03\u3001\u6307\u5b9a\u5e94\u7528\u8ba1\u6570\u89c4\u5219\u7684\u8303\u56f4<\/h3>\n<p>\u8fd9\u4e2a\u662f\u4f7f\u7528 <code>range<\/code> \u5c5e\u6027\u5b9e\u73b0\u7684\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5e0c\u671b\u67d0\u4e2a\u6570\u503c\u8303\u56f4\uff0c\u6216\u8005\u67d0\u51e0\u6bb5\u6570\u503c\u8303\u56f4\u5168\u90e8\u4f7f\u7528\u81ea\u5b9a\u4e49\u7684\u8ba1\u6570\u89c4\u5219\uff0c\u5176\u4ed6\u5730\u65b9\u4f9d\u7136\u4f7f\u7528\u9ed8\u8ba4\u7684\u8ba1\u6570\u89c4\u5219\uff08\u5c31\u662f1,2,3,4,5\u8fd9\u6837\u9012\u589e\uff09\uff0c<code>range<\/code> \u5c5e\u6027\u5c31\u975e\u5e38\u5408\u9002\u3002<\/p>\n<p><code>additive-symbols<\/code> \u5c5e\u6027\u90a3\u91cc\u7684<a href=\"https:\/\/www.zhangxinxu.com\/study\/202110\/counter-style-additive-symbols-demo.php\" rel=\"noopener\" target=\"_blank\">demo\u6848\u4f8b<\/a>\u5df2\u7ecf\u5c55\u793a\u4e86 range \u5c5e\u6027\u7684\u4f7f\u7528\uff0c\u8fd9\u91cc\u4e0d\u518d\u91cd\u590d\u6dfb\u52a0\u6f14\u793a\u8bf4\u3002<\/p>\n<p>\u4e0d\u8fc7\u8bed\u6cd5\u8fd9\u5757\uff0c\u6709\u4e2a\u4e1c\u897f\u8981\u8bb2\u4e0b\uff0c\u90a3\u5c31\u662f range \u5c5e\u6027\u652f\u6301\u4e00\u4e2a\u540d\u4e3a <code>infinite<\/code> \u7684\u5173\u952e\u5b57\uff0c\u5176\u5b9e\u8868\u793a\u7684\u662f\u8ba1\u6570\u7684\u8fb9\u754c\u3002<\/p>\n<p>\u4e00\u4e9b\u4f7f\u7528\u793a\u610f\uff1a<\/p>\n<pre>range: infinite 10;<\/pre>\n<p>\u8868\u793a\u5e94\u8be5\u8ba1\u6570\u7684\u8303\u56f4\u4ece\u4e00\u5f00\u59cb\u5230\u6570\u5b5710.<\/p>\n<pre>range: infinite 6, 10 infinite;<\/pre>\n<p>\u8868\u793a7,8,9\u8fd93\u4e2a\u8ba1\u6570\u4e0d\u5339\u914d\u81ea\u5b9a\u4e49\u7684\u8ba1\u6570\u89c4\u5219\u3002<\/p>\n<p>\u4f8b\u5982\u4e0b\u9762\u8fd9\u4e2a\u4ee3\u7801\uff1a<\/p>\n<pre>@counter-style range-infinite-example {\r\n    system: extends cjk-decimal;\r\n    range: infinite 6, 10 infinite;\r\n}\r\nul {\r\n    list-style: range-infinite-example;\r\n}<\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\u7b2c7-9\u9879\u524d\u9762\u662f\u6570\u5b57\uff0c\u800c\u975e\u4e2d\u6587\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-25_004716.png\" width=\"177\" height=\"221\" alt=\"range\u5c5e\u6027infinite\u5173\u952e\u5b57\u503c\u7684\u8868\u73b0\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u516b\u3001\u515c\u5e95\u8ba1\u6570\u7684fallback<\/h3>\n<p><code>fallback<\/code> \u53ef\u4ee5\u548c <code>system<\/code>\u3001<code>symbols<\/code> \u5c5e\u6027\u540c\u65f6\u4f7f\u7528\uff0c\u8868\u793a\u5982\u679c\u8ba1\u6570\u8303\u56f4\u6ea2\u51fa\uff0c\u8be5\u65f6\u5019\u4ec0\u4e48\u89c4\u5219\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f1,2,3,4,5\u6570\u503c\u8ba1\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 <code>fallback<\/code> \u5c5e\u6027\u8fdb\u884c\u6539\u53d8\u3002<\/p>\n<p>\u8fd8\u662f <code>additive-symbols<\/code> \u5c5e\u6027\u8fd9\u91cc\u72b6\u5143\u9009\u79c0\u7684\u6848\u4f8b\uff0c\u5982\u679c\u6211\u4eec\u5728\u8ba1\u6570\u89c4\u5219\u4e2d\u589e\u52a0\u8fd9\u4e48\u4e00\u884c <code>fallback<\/code> \u58f0\u660e\uff1a<\/p>\n<pre>@counter-style nba-draft {\r\n    system: additive;\r\n    additive-symbols: \u63a2\u82b1 3, \u699c\u773c 2, \u72b6\u5143 1;\r\n    range: 1 3;\r\n    fallback: cjk-decimal;\r\n}\r\n.draft {\r\n    list-style-type: nba-draft;\r\n}<\/pre>\n<p>\u7b2c4\u9879\u548c\u7b2c5\u9879\u524d\u9762\u5c31\u662f\u6570\u503c\u4e86\u3002<\/p>\n<p>\u622a\u56fe\u771f\u5b9eWindows Chrome\u4e0b\u7684\u6e32\u67d3\u8868\u73b0\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-25_005706.png\" width=\"273\" height=\"191\" alt=\"fallback \u6539\u53d8\u9ed8\u8ba4\u8ba1\u6570\u89c4\u5219\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6548\u679c\u53ef\u4ee5<a href=\"https:\/\/www.zhangxinxu.com\/study\/202110\/counter-style-additive-symbols-demo.php\" rel=\"noopener\" target=\"_blank\">\u8bbf\u95ee\u6b64demo<\/a>\u67e5\u770b\u3002<\/p>\n<p>\u81f3\u6b64\uff0c\u6240\u6709 <code>@counter-style<\/code> \u89c4\u5219\u4e0b\u7684 CSS \u5c5e\u6027\u90fd\u4ecb\u7ecd\u5b8c\u4e86\uff0c\u5b66\u5b8c\u4e4b\u540e\uff0c\u4f1a\u53d1\u73b0\u76f8\u5173\u7684\u89c4\u5219\u8bbe\u8ba1\uff0c\u8003\u8651\u7684\u7ec6\u8282\u8fd8\u662f\u5f88\u591a\u7684\uff0c\u53ef\u8c13\u662f\u9762\u9762\u4ff1\u5230\uff0c\u57fa\u672c\u4e0a\uff0c\u6240\u6709\u7684\u6709\u5e8f\u8ba1\u6570\u573a\u666f\u90fd\u53ef\u4ee5\u5b9e\u73b0\u4e86\u3002<\/p>\n<h4>\u517c\u5bb9\u6027<\/h4>\n<p>\u76ee\u524d Chrome \u548c Firefox \u90fd\u662f\u652f\u6301\u7684\uff0cSafari \u6d4f\u89c8\u5668\u62d6\u4e86\u540e\u817f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/2021-10-25_010502.png\" width=\"632\" height=\"221\" alt=\"@counter-style\u89c4\u5219\u517c\u5bb9\u6027\" class=\"alignnone size-medium\" \/><\/p>\n<h4>\u8865\u5145<\/h4>\n<p>\u6587\u7ae0\u51fa\u73b0\u4e86\u4e0d\u5c11\u7279\u6b8a\u7684\u6709\u5e8f\u5b57\u7b26\uff0c\u662f\u4ece\u6211\u73cd\u85cf\u591a\u5e74\u7684\u201c<a href=\"https:\/\/www.zhangxinxu.com\/sp\/character.html\" rel=\"noopener\" target=\"_blank\">\u4e71\u4e03\u516b\u7cdf\u5b57\u7b26\u5408\u96c6<\/a>\u201d\u4e2d\u590d\u5236\u8fc7\u6765\u7684\u3002<\/p>\n<h3>\u4e5d\u3001\u53c8\u8981\u88ab\u9886\u5bfc\u5410\u69fd\u4e86<\/h3>\n<p>\u4e00\u770b\u65f6\u95f4 00:59\uff0c\u52a0\u4e0a\u914d\u56fe\u4e00\u7cfb\u5217\u5de5\u4f5c\uff0c\u6d17\u6d17\u6f31\u6f31\uff0c1:30\u4e4b\u524d\u4f11\u606f\u60ac\u4e86\u3002<\/p>\n<p>\u672c\u6587\u5df2\u7ecf\u5f88\u957f\u4e86\uff0c\u7ed3\u8bed\u5c31\u514d\u4e86\uff0c\u6b22\u8fce\u5206\u4eab\uff0c\u8ba9\u66f4\u591a\u4eba\u770b\u5230\uff0c\u4e0d\u6789\u6211\u5410\u8840\u521b\u4f5c\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/emtion\/emoji\/2764.svg\" width=\"20\" height=\"20\" align=\"absmiddle\"><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u6b22\u8fce\u5206\u4eab\uff0c\u52ff\u5168\u6587\u8f6c\u8f7d\uff0c\u5982\u679c\u5b9e\u5728\u559c\u6b22\uff0c\u53ef\u6536\u85cf\uff0c\u6c38\u4e0d\u8fc7\u671f\uff0c\u4e14\u4f1a\u53ca\u65f6\u66f4\u65b0\u77e5\u8bc6\u70b9\u53ca\u4fee\u6b63\u9519\u8bef\uff0c\u9605\u8bfb\u4f53\u9a8c\u4e5f\u66f4\u597d\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10148\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=10148<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202110\/cover-counter-style.jpg\" width=\"160\" height=\"106\" alt=\"counter-style\u5c01\u9762\u56fe\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>\u867d\u7136\u76ee\u524d\u9879\u76ee\u7b26\u53f7\u652f\u6301\u7684\u5173\u952e\u5b57\u503c\u63a5\u8fd1\u4e0a\u767e\u4e2a\uff0c\u4f46\u662f\u8fd8\u662f\u4e0d\u80fd\u6ee1\u8db3\u65e5\u5e38\u5f00\u53d1\u7684\u9700\u6c42\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c@counter-style \u51fa\u73b0\u4e86\uff0c\u53ef\u4ee5\u8ba9\u6211\u4eec\u81ea\u5b9a\u4e49\u8ba1\u6570\u89c4\u5219\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1787,365,936,1717,1789,1788,281,216],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/10148"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=10148"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/10148\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=10148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=10148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=10148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}