{"id":12316,"date":"2026-08-03T21:20:14","date_gmt":"2026-08-03T13:20:14","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=12316"},"modified":"2026-08-03T21:20:14","modified_gmt":"2026-08-03T13:20:14","slug":"css-flex-grid-column-row-rule","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2026\/08\/css-flex-grid-column-row-rule\/","title":{"rendered":"\u6765\u4e86\u6765\u4e86\uff0cFlex\/Grid\u5e03\u5c40\u7684\u95f4\u9699\u88c5\u9970\u7ebf\u5b83\u6765\u4e86"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=12316\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=12316<\/a><br \/>\n\u672c\u6587\u53ef\u5168\u6587\u8f6c\u8f7d\uff0c\u4f46\u9700\u8981\u4fdd\u7559\u539f\u4f5c\u8005\u3001\u51fa\u5904\u4ee5\u53ca\u6587\u4e2d\u94fe\u63a5\uff0cAI\u6293\u53d6\u4fdd\u7559\u539f\u6587\u5730\u5740\uff0c\u4efb\u4f55\u7f51\u7ad9\u5747\u53ef\u6458\u8981\u805a\u5408\uff0c\u5546\u7528\u8bf7\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<h3>\u4e00\u3001\u5148\u8bb2\u4e0b\u5386\u53f2<\/h3>\n<p>\u95f4\u9699\u88c5\u9970\u7ebf\u5176\u5b9e\u7531\u6765\u5df2\u4e45\uff0c\u5728\u5927\u591a\u6570\u524d\u7aef\u4ece\u4e1a\u4eba\u5458\u8fd8\u672a\u5165\u884c\u7684\u65f6\u5019\u5c31\u5df2\u7ecf\u652f\u6301\u4e86\uff0c\u5927\u5bb6\u5982\u679c\u67e5\u770b <code>column-rule<\/code> \u5c5e\u6027\u7684\u517c\u5bb9\u6027\uff0c\u4f1a\u53d1\u73b0\u6781\u4f73\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_145539.png\" width=\"651\" height=\"284\" alt=\"column-rule\u517c\u5bb9\u6027\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4f46\u662f\uff0c\u8bf7\u6ce8\u610f\uff0c<code>column-rule<\/code> \u5c5e\u6027\u751f\u6548\u662f\u6709\u524d\u63d0\u7684\uff0c\u90a3\u5c31\u662f\u53ea\u80fd\u5728Columns\u5e03\u5c40\u4e2d\u6709\u6548\u3002<\/p>\n<p>\u800cColumns\u5e03\u5c40\u6211\u5df2\u7ecf\u5feb10\u5e74\u6ca1\u6709\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u4f7f\u7528\u4e86\u3002<\/p>\n<p>\u540c\u65f6\uff0c\u4e4b\u524d\u7684<code>column-rule<\/code> \u5c5e\u6027\u6240\u8bbe\u7f6e\u7684\u88c5\u9970\u7ebf\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u548c<code>border<\/code>\u5c5e\u6027\u7c7b\u4f3c\uff0c\u4e0d\u80fd\u8bbe\u7f6e\u7f29\u8fdb\uff0c\u4e0d\u652f\u6301\u591a\u5c5e\u6027\uff0c\u7b97\u4e0d\u5f97\u5f3a\u5927\u3002<\/p>\n<p>\u6240\u4ee5\uff0c<code>column-rule<\/code> \u5c5e\u6027\u53ef\u8c13\u540d\u5b58\u5b9e\u4ea1\u3002<\/p>\n<p>\u53ea\u6709\u62b1\u7d27Flex\u5e03\u5c40\u548cGrid\u5e03\u5c40\u7684\u5927\u817f\uff0c<code>column-rule<\/code> \u5c5e\u6027\u624d\u53ef\u4ee5\u771f\u6b63\u8fce\u6765\u6625\u5929\u3002<\/p>\n<p>\u7b49\u554a\u7b49\uff0c\u7b49\u554a\u7b49\uff0c\u57282026\u5e74\u7684\u67d0\u5929\uff0c\u7ec8\u4e8e\uff0c\u5168\u65b0\u7684\u88c5\u9970\u7ebf\u6548\u679c\u53ef\u4ee5\u5728Flex\/Grid\u5e03\u5c40\u4e2d\u751f\u6548\u4e86\u3002<\/p>\n<p>\u6bd4\u65b9\u8bf4\u8fd9\u4e2a\u6f14\u793a\u9875\u9762\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202608\/css-gap-decorations-split-screen-demo.html\" rel=\"noopener\" target=\"_blank\">\u4f7f\u7528 Gap \u88c5\u9970\u5b9e\u73b0\u5206\u5c4f\u5e03\u5c40demo<\/a><\/p>\n<p>\u6838\u5fc3CSS\u4ee3\u7801\uff1a<\/p>\n<pre>.flex-split {\r\n  gap: 1px;\r\n  column-rule-width: 2px;\r\n  column-rule-style: dashed, solid;\r\n  column-rule-color: #d4d0c8;\r\n  row-rule-width: 2px;\r\n  row-rule-style: dashed, solid;\r\n  row-rule-color: #d4d0c8;\r\n}\r\n@media (width < 600px) {\r\n  .flex-split { flex-direction: column; }\r\n}<\/pre>\n<p>\u4e8e\u662f\uff0c\u5728\u5bbd\u5c4f\u4e0b\uff0c\u5782\u76f4\u88c5\u9970\u7ebf\u6548\u679c\u751f\u6548\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_154426.webp\" width=\"659\" height=\"293\" alt=\"\u6c34\u5e73\u5e03\u5c40\u4e0b\u7684gap\u88c5\u9970\u7ebf\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u624b\u673a\u8bbe\u5907\u4e0b\uff0c\u5219\u662f\u6c34\u5e73\u65b9\u5411\u7684\u88c5\u9970\u7ebf\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_160730.webp\" width=\"301\" height=\"458\" alt=\"\u6c34\u5e73\u65b9\u5411\u88c5\u9970\u7ebf\u6548\u679c\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6bd4\u4e4b\u524d\u4f7f\u7528\u4f2a\u5143\u7d20\uff0c\u6216\u8005\u63d2\u5165\u5206\u9694\u7ebf\u5143\u7d20\u5b9e\u73b0\u7b80\u5355\u591a\u4e86\u3002<\/p>\n<p>\u9664\u4e86\u57fa\u672c\u7684\u5206\u9694\u7ebf\u88c5\u9970\u6548\u679c\uff0c\u8fd8\u987a\u4fbf\u5e26\u6765\u4e86\u4f17\u591a\u5176\u4ed6\u5f3a\u5927\u7684\u7279\u6027\uff0c\u4f8b\u5982\u652f\u6301\u591a\u5c5e\u6027\u503c\u3001\u4ea4\u70b9\u5904\u5982\u4f55\u4e2d\u65ad\u3001\u95f4\u8ddd\u8fb9\u7f18\u8ddd\u79bb\u63a7\u5236\u3001repeat()\u51fd\u6570\u8bed\u6cd5\u3001\u52a8\u753b\u652f\u6301\u7b49\u3002<\/p>\n<p>\u6211\u4eec\u4e00\u4e2a\u4e00\u4e2a\u6765\u770b\u4e0b\u3002<\/p>\n<h3>\u4e8c\u3001\u591a\u5c5e\u6027\u503c\u548c repeat() \u8bed\u6cd5<\/h3>\n<p>\u5982\u4eca\uff0c\u65e0\u8bba\u662f<code>column-rule<\/code>\u5c5e\u6027\uff0c<code>row-rule<\/code>\u5c5e\u6027\uff0c\u4ea6\u6216\u662f\u4ed6\u4eec\u7684\u5b50\u5c5e\u6027\uff0c\u90fd\u652f\u6301\u540c\u65f6\u8bbe\u7f6e\u591a\u4e2a\u503c\uff0c\u5206\u522b\u8868\u793a\u4ece\u5f00\u59cb\u5230\u7ed3\u675f\u5404\u81ea\u7684\u5206\u9694\u7ebf\u6837\u5f0f\u6548\u679c\u3002<\/p>\n<p>\u4e14\u770b\u4e00\u4e2a\u6781\u4e3a\u7b80\u5355\u7684\u6848\u4f8b\uff0cHTML\u548cCSS\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;ul&gt;\r\n  &lt;li&gt;\u300aCSS\u4e16\u754c\u300b&lt;\/li&gt;\r\n  &lt;li&gt;\u300aCSS\u9009\u62e9\u5668\u4e16\u754c\u300b&lt;\/li&gt;\r\n  &lt;li&gt;\u300aCSS\u65b0\u4e16\u754c\u300b&lt;\/li&gt;\r\n  &lt;li&gt;\u300aHTML\u5e76\u4e0d\u7b80\u5355\u300b&lt;\/li&gt;\r\n&lt;\/ul&gt;<\/pre>\n<pre>ul {\r\n  display: flex;\r\n  flex-direction: column;\r\n  gap: .5em;\r\n  row-rule: 2px dashed, dotted;\r\n  row-rule-color: red, blue, green;\r\n}<\/pre>\n<p>\u6b64\u65f6\uff0c\u53ef\u89c1\u5982\u4e0b\u56fe\u6240\u793a\u7684\u5206\u9694\u7ebf\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_165911.png\" width=\"200\" height=\"140\" alt=\"\u6c34\u5e73\u5206\u5272\u7ebf\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6211\u4eec\u6765\u770b\u4e0b\u5c5e\u6027\u503c\u662f\u5982\u4f55\u751f\u6548\u7684\u3002<\/p>\n<p>\u5148\u770b<code>row-rule<\/code>\u5c5e\u6027\u3002<\/p>\n<p>\u5217\u8868\u5171\u6709\u56db\u9879\uff0c\u6240\u6709\u4f1a\u67093\u9053\u5206\u9694\u7ebf\u3002<\/p>\n<ol>\n<li><code>2px dashed<\/code>\u663e\u7136\u5bf9\u5e94\u7b2c\u4e00\u6761\u7ebf\uff1b<\/li>\n<li><code>dotted<\/code>\u5219\u5bf9\u5e94\u7b2c\u4e8c\u6761\uff0c\u7136\u540e\u8fd9\u91cc\u7684\u5bbd\u5ea6\u89c4\u5219\u548c<code>border<\/code>\u5c5e\u6027\u4e00\u81f4\uff0c\u9ed8\u8ba4\u90fd\u662f<code>medium<\/code>\u5c3a\u5bf8\uff0c\u4e5f\u5c31\u662f3px\uff0c\u56e0\u6b64\uff0c\u8fd9\u91cc\u5b9e\u9645\u6e32\u67d3\u7b49\u540c\u4e8e <code>3px dotter<\/code>\uff1b<\/li>\n<li><code>row-rule<\/code>\/<code>column-rule<\/code>\u7684\u591a\u503c\u5c5e\u6027\u8d70\u7684\u662f\u5e73\u94fa\u89c4\u5219\u3002\u4e5f\u5c31\u662f\uff1a\n<ul>\n<li>\u5982\u679c\u4ec5\u4e00\u4e2a\u503c\uff0c\u90a3\u6240\u6709\u7684gap\u7ebf\u90fd\u4f7f\u7528\u8be5\u503c\uff1b<\/li>\n<li>\u5982\u679c\u662f2\u4e2a\u503c\uff0c\u5219\u4e24\u4e24\u5faa\u73af\u5339\u914d\uff1b<\/li>\n<li>\u66f4\u591a\u6570\u91cf\u7684\u503c\u4e00\u6837\u4e0d\u65ad\u5faa\u73af\u5e73\u94fa\u6e32\u67d3\u3002<\/li>\n<\/ul>\n<p>\u6240\u4ee5\uff0c\u8fd9\u91cc\uff0c\u7b2c\u4e09\u6761\u7ebf\u7684\u6837\u5f0f\u4e5f\u662f<code>2px dashed<\/code>\u3002\n<\/li>\n<\/ol>\n<p>\u518d\u770b<code>row-rule-color<\/code>\u5c5e\u6027\uff0c\u8fd9\u4e2a\u5f88\u597d\u7406\u89e3\uff0c\u4e09\u6761\u7ebf\u5206\u522b\u4e09\u4e2a\u989c\u8272\uff0c\u4e00\u6b21\u662f\u7ea2\u84dd\u7eff\u3002<\/p>\n<p>\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff0c\u5982\u679c\u6211\u8bbe\u7f6e4\u4e2a\u989c\u8272\u503c\uff0c\u4f1a\u600e\u4e48\u6837\u5462\uff1f<\/p>\n<p>\u7b54\u6848\u662f\uff1a\u4e0d\u4f1a\u600e\u4e48\u6837\uff0c\u8d85\u51fa\u6570\u91cf\u7684\u5c5e\u6027\u503c\u4f1a\u88ab\u5ffd\u7565\u3002<\/p>\n<h4>repeat()\u51fd\u6570<\/h4>\n<p>\u5982\u679c\u5206\u9694\u7ebf\u7684\u6570\u91cf\u5f88\u591a\uff0c\u6211\u4eec\u4e00\u4e2a\u4e00\u4e2a\u503c\u53bb\u8bbe\u7f6e\uff0c\u4f1a\u7d2f\u6b7b\u4eba\u7684\uff0c\u4ee3\u7801\u4e5f\u5570\u55e6\uff0c\u6b64\u65f6\u53ef\u4ee5\u4f7f\u7528<code>repeat()<\/code>\u51fd\u6570\u7b80\u5316\u6211\u4eec\u7684\u5c5e\u6027\u8bbe\u7f6e\u3002<\/p>\n<p>\u6bd4\u65b9\u8bf4\u4e0b\u9762\u8fd9\u4e2a\u6848\u4f8b\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202608\/css-gap-decorations-settings-list-demo.html\" rel=\"noopener\" target=\"_blank\">row-rule\u5e94\u7528repeat()\u51fd\u6570demo<\/a><\/p>\n<p>\u6838\u5fc3CSS\u4ee3\u7801\u53c2\u89c1\u4e0b\u65b9\uff1a<\/p>\n<pre>.flex-settings {\r\n  row-gap: 1px;\r\n  row-rule: 1px solid #243352;\r\n  row-rule-width: repeat(2, 1px), 4px;\r\n  rule-inset-start: 16px;\r\n}<\/pre>\n<p>\u53ef\u5f97\u5230\u5982\u4e0b\u56fe\u6240\u793a\u7684\u6548\u679c\uff0c\u53ef\u4ee5\u770b\u5230\uff0c\u98ce\u683c\u7ebf\u7684\u5bbd\u5ea6\u6709\u7740 <code>1px 1px 4px<\/code> \u4e0d\u65ad\u5faa\u73af\u6e32\u67d3\u7684\u6548\u679c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_172203.webp\" width=\"310\" height=\"378\" alt=\"\u5206\u9694\u7ebf\u5e73\u94farepeat()\u51fd\u6570\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u4e09\u3001rule-break\u4e0e\u4ea4\u53c9\u4e2d\u65ad\u63a7\u5236<\/h3>\n<p>\u5728\u4e00\u4e2a\u4e8c\u7ef4\u5e03\u5c40\u4e2d\uff0c\u4f8b\u5982Grid\u5e03\u5c40\uff0c\u6216\u8005\u8bbe\u7f6e\u4e86<code>flex-wrap:wrap<\/code>\u51fa\u73b0\u6362\u884c\u7684Flex\u5e03\u5c40\uff0c\u540c\u65f6\u51fa\u73b0\u7eb5\u5411\u5206\u9694\u7ebf\u548c\u6a2a\u5411\u5206\u9694\u7ebf\u662f\u518d\u6b63\u5e38\u4e0d\u8fc7\u7684\u4e8b\u60c5\u3002<\/p>\n<p>\u4e8e\u662f\u5c31\u4f1a\u51fa\u73b0\u7eb5\u7ebf\u548c\u6a2a\u7ebf\u4e92\u76f8\u4ea4\u53c9\u76f8\u9047\u7684\u573a\u666f\u3002<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4e24\u7ebf\u662f\u76f8\u4ea4\u7684\uff0c\u4f46\u5f88\u591a\u65f6\u5019\uff0c\u7eb5\u6a2a\u76f8\u4ea4\u7684\u6548\u679c\u5e76\u4e0d\u597d\u5feb\uff0c\u6700\u597d\u5e0c\u671b\u4e92\u76f8\u4fdd\u7559\u5b89\u5168\u8ddd\u79bb\u3002<\/p>\n<p>\u5219\u53ef\u4ee5\u4f7f\u7528CSS <code>rule-break<\/code>\u5c5e\u6027\uff0c\u8bbe\u7f6e<code>rule-break:intersection<\/code>\u58f0\u660e\u5c31\u597d\u4e86\u3002<\/p>\n<p>\u8bf7\u770b\u6848\u4f8b\uff1a<\/p>\n<pre>&lt;section&gt;\r\n  &lt;canvas&gt;&lt;\/canvas&gt;\r\n  &lt;canvas&gt;&lt;\/canvas&gt;\r\n  &lt;canvas&gt;&lt;\/canvas&gt;\r\n  &lt;canvas&gt;&lt;\/canvas&gt;\r\n  &lt;canvas&gt;&lt;\/canvas&gt;\r\n  &lt;canvas&gt;&lt;\/canvas&gt;\r\n&lt;\/section&gt;<\/pre>\n<pre>section {\r\n  display: grid;\r\n  width: 300px;\r\n  grid: 1fr 1fr \/ 1fr 1fr 1fr;\r\n  gap: 1rem;\r\n  \r\n  canvas {\r\n    aspect-ratio: 1;\r\n    background: deepskyblue;\r\n    width: 100%;\r\n  }\r\n  \r\n  column-rule: solid red;\r\n  row-rule: solid green;\r\n  \/* rule-break: intersection *\/\r\n}<\/pre>\n<p>\u6b64\u65f6\u53ef\u4ee5\u770b\u5230\u6c34\u5e73\u65b9\u5411\u548c\u5782\u76f4\u65b9\u5411\u7684\u5206\u9694\u7ebf\u76f8\u4ea4\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_194306.png\" width=\"309\" height=\"205\" alt=\"\u5206\u9694\u7ebf\u76f8\u4ea4\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6b64\u65f6\uff0c\u6211\u4eec\u7ed9<code>section<\/code>\u5143\u7d20\u8bbe\u7f6e<code>rule-break:intersection<\/code>\uff0c\u539f\u672c\u4ea4\u53c9\u7684\u5730\u65b9\u4e92\u76f8\u7559\u767d\u4e86\uff0c\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_200338.png\" width=\"304\" height=\"198\" alt=\"\u4ea4\u53c9\u907f\u8ba9\u540e\u7684\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u56db\u3001\u5206\u9694\u7ebf\u7684\u6269\u5c55\u4e0e\u6536\u7f29<\/h3>\n<p><code>column-rule-inset<\/code> \u548c <code>row-rule-inset<\/code> \u5c5e\u6027\u7528\u4e8e\u63a7\u5236\u88c5\u9970\u5728\u95f4\u8ddd\u5185\u7684\u6269\u5c55\u8ddd\u79bb\u3002<\/p>\n<p>\u5982\u679c\u65e0\u9700\u533a\u5206\u6c34\u5e73\u548c\u5782\u76f4\u8ddd\u79bb\uff0c\u6216\u8005\u6c34\u5e73\u548c\u5782\u76f4\u8ddd\u79bb\u4e00\u81f4\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 <code>rule-inset<\/code> \u5c5e\u6027\u3002<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code>rule-inset<\/code> \u5c5e\u6027\u8bbe\u7f6e\u7684\u7f29\u8fdb\u8ddd\u79bb\u662f\u5bf9\u79f0\u7684\uff0c\u5982\u679c\u5f00\u53d1\u8005\u5e0c\u671b\u53d8\u5316\u7684\u8ddd\u79bb\u662f\u4e0d\u5bf9\u79f0\u7684\uff0c\u90a3\u4e48\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4e24\u4e2aCSS\u5c5e\u6027\u3002<\/p>\n<ul>\n<li><strong>rule-inset-cap<\/strong>\uff1a\u9002\u7528\u4e8e\u6ca1\u6709\u4ea4\u53c9\u95f4\u8ddd\u7684\u7aef\u70b9\u7684\u8ddd\u79bb\u8bbe\u7f6e\uff1b<\/li>\n<li><strong>rule-inset-junction<\/strong>\uff1a\u9002\u7528\u4e8e\u4e0e\u5176\u4ed6\u95f4\u8ddd\u76f8\u4ea4\u7684\u7aef\u70b9\u7684\u8ddd\u79bb\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<p>\u4e00\u4f8b\u80dc\u5343\u8a00\uff0c\u8fd8\u662f\u4e0a\u9762\u7684\u6848\u4f8b\uff0c\u6211\u4eec\u5206\u522b\u8bbe\u7f6e<code>rule-inset-cap<\/code>\u548c<code>rule-inset-junction<\/code>\u7684\u503c\uff0c\u6765\u770b\u770b\u6700\u7ec8\u7684\u6e32\u67d3\u6548\u679c\u3002<\/p>\n<p>\u5173\u952eCSS\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>section {\r\n  column-rule: solid red;\r\n  row-rule: solid green;\r\n  rule-break: intersection;\r\n  rule-inset-cap: 5px;\r\n  rule-inset-junction: 20px;\r\n}<\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u4ea4\u53c9\u70b9\u4f4d\u7f6e\u7684\u7f29\u8fdb\u6781\u5927\uff0c\u800c\u56db\u8fb9\u7684\u7aef\u70b9\u7f29\u8fdb\u4e3a5px\uff0c\u660e\u663e\u5c0f\u4e00\u5708\uff0c\u5373\u6240\u8c13\u7684\u4e0d\u5bf9\u79f0\u7f29\u8fdb\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_201628.png\" width=\"333\" height=\"237\" alt=\"\u4e0d\u5bf9\u79f0\u7f29\u8fdb\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u65e0\u8bba\u662f<code>rule-inset-cap<\/code>\u8fd8\u662f<code>rule-inset-junction<\/code>\u5c5e\u6027\u90fd\u652f\u6301\u8d1f\u503c\uff0c\u6b64\u65f6\u88c5\u9970\u7ebf\u5c31\u4e0d\u662f\u7f29\u8fdb\uff0c\u800c\u662f\u6269\u5f20\u6548\u679c\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u5982\u679c\u53ea\u662f\u5e0c\u671b\u8c03\u6574\u67d0\u4e00\u4e2a\u65b9\u5411\u7684\u88c5\u9970\u7ebf\u7684\u7f29\u653e\u6548\u679c\uff0c\u53ef\u4ee5\u52a0\u4e0a <code>column-<\/code> \u6216\u8005 <code>row-<\/code> \u524d\u7f00\uff0c\u4f8b\u5982 <code>column-rule-inset-cap<\/code> \u548c <code>column-rule-inset-junction<\/code> \u5c5e\u6027\u3002<\/p>\n<h3>\u4e94\u3001\u5206\u9694\u7ebf\u7684\u663e\u793a\u8303\u56f4\u63a7\u5236<\/h3>\n<p>\u8fd8\u662f\u4e0a\u9762\u7684\u6848\u4f8b\uff0c\u533a\u522b\u5728\u4e8eGrid\u5e03\u5c40\u7684\u5b50\u5143\u7d20\u53ea\u67094\u9879\uff0c\u6b64\u65f6\uff0c\u95f4\u9699\u88c5\u9970\u7ebf\u7684\u6548\u679c\u5c31\u4f1a\u8ba9\u4eba\u611f\u5230\u56f0\u60d1\u3002<\/p>\n<p>\u660e\u660e\u6ca1\u6709\u5143\u7d20\u9879\uff0c\u7ed3\u679c\u5374\u51ed\u7a7a\u51fa\u73b0\u4e86\u5206\u9694\u88c5\u9970\u7ebf\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_203313.png\" width=\"310\" height=\"204\" alt=\"\u591a\u4f59\u7684\u5206\u9694\u7ebf\u6548\u679c\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6b64\u65f6\u5c31\u8f6e\u5230 <code>column-rule-visibility-items<\/code> \u548c <code>row-rule-visibility-items<\/code> \u5c5e\u6027\u51fa\u9a6c\u4e86\u3002<\/p>\n<p>\u5982\u679c\u65e0\u9700\u533a\u5206\u65b9\u5411\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u5408\u5199\u5c5e\u6027 <code>rule-visibility-items<\/code>\uff0c\u5176\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li><code dir=\"ltr\" translate=\"no\">normal<\/code>\uff08\u9ed8\u8ba4\uff09\uff1a\u53d6\u51b3\u4e8e\u5bb9\u5668\u7c7b\u578b\u3002\u6839\u636e\u6211\u7684\u6d4b\u8bd5\uff0c\u5927\u591a\u6570\u573a\u666f\u4e0b\u6548\u679c\u548c all \u4e00\u81f4\u3002<\/li>\n<li><code dir=\"ltr\" translate=\"no\">all<\/code>\uff1a\u89c4\u5219\u663e\u793a\u5728\u6bcf\u4e2a\u95f4\u8ddd\u4e2d\uff0c\u5373\u4f7f\u662f\u6ca1\u6709\u5143\u7d20\u7684\u95f4\u8ddd\u4e5f\u662f\u5982\u6b64\u3002<\/li>\n<li><code dir=\"ltr\" translate=\"no\">around<\/code>\uff1a\u53ea\u8981\u5b58\u6709\u4e00\u4e2a\u6216\u591a\u4e2a\u76f8\u90bb\u9879\uff0c\u95f4\u9699\u7ebf\u5c31\u4f1a\u663e\u793a\u3002<\/li>\n<li><code dir=\"ltr\" translate=\"no\">between<\/code>\uff1a\u95f4\u9699\u7ebf\u4ec5\u4f1a\u51fa\u73b0\u5728\u4e24\u4e2a\u76f8\u90bb\u9879\u4e4b\u95f4\u3002<\/li>\n<\/ul>\n<p>\u4e0b\u56fe\u793a\u610f\u4e86 <code>around<\/code> \u548c <code>between<\/code> \u8fd9\u4e24\u4e2a\u5c5e\u6027\u503c\u7684\u533a\u522b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_204258.png\" width=\"322\" height=\"446\" alt=\"between\u548caround\u533a\u522b\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u76f8\u4fe1\u8fd8\u662f\u5f88\u597d\u7406\u89e3\u7684\u3002<\/p>\n<h3>\u516d\u3001\u52a8\u753b\u3001\u517c\u5bb9\u6027\u4e0e\u7ed3\u8bed<\/h3>\n<p>\u95f4\u9699\u5206\u9694\u7ebf\u7684\u5bbd\u5ea6\u3001\u989c\u8272\u548c\u4ea4\u53c9\u7f29\u8fdb\u90fd\u662f\u53ef\u6dfb\u52a0\u52a8\u753b\u6548\u679c\u7684\uff0c\u5177\u4f53\u4e0d\u5c55\u793a\uff0c\u8fd9\u4e2a\u61c2\u7684\u90fd\u61c2\uff0c\u8bbe\u7f6e<code>transition<\/code>\u8fc7\u6e21\uff0c\u81ea\u7136\u53ef\u4ee5\u770b\u5230\u6548\u679c\u3002<\/p>\n<p>\u4e0b\u9762\u8bf4\u4e0b\u517c\u5bb9\u6027\uff0cGap\u88c5\u9970\u662f\u76f8\u5f53\u65b0\u7684\u4e00\u4e2a\u7279\u6027\uff0c\u76ee\u524d\u53ea\u6709Chrome 149+ \u6d4f\u89c8\u5668\u624d\u652f\u6301\uff0c\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_204717.png\" width=\"652\" height=\"235\" alt=\"row-rule\u517c\u5bb9\u6027\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5509\uff0c\u4e1c\u897f\u867d\u597d\uff0c\u4f46\u73b0\u5728\u8fd8\u6ca1\u547d\u4eab\u7528\u554a\uff0c\u7b49\u8fc7\u51e0\u5e74\u517c\u5bb9\u6027\u8ddf\u4e0a\u4e86\uff0c\u524d\u7aef\u5708\u5b50\u8fd8\u4e0d\u77e5\u9053\u53d8\u6210\u4ec0\u4e48\u6837\u5b50\u5462\uff01<\/p>\n<p>\u597d\u4e86\uff0c\u5c31\u8bf4\u8fd9\u4e48\u591a\u5427\u3002<\/p>\n<p><strong>\u53c2\u8003\u6587\u7ae0\uff1a<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/developer.chrome.com\/blog\/gap-decorations-stable?hl=zh-cn\" rel=\"noopener\" target=\"_blank\">\u95f4\u9699\u88c5\u9970\uff1a\u73b0\u5df2\u5728 Chromium \u4e2d\u63a8\u51fa<\/a><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202608\/2026-8-3_205758.png\" width=\"129\" height=\"118\" alt=\"\u7af9\u77e5\u4e86\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u4f1a\u7ecf\u5e38\u66f4\u65b0\u77e5\u8bc6\u70b9\u4ee5\u53ca\u4fee\u6b63\u4e00\u4e9b\u9519\u8bef\uff0c\u56e0\u6b64\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u539f\u51fa\u5904\uff0c\u65b9\u4fbf\u6eaf\u6e90\uff0c\u907f\u514d\u9648\u65e7\u9519\u8bef\u77e5\u8bc6\u7684\u8bef\u5bfc\uff0c\u540c\u65f6\u6709\u66f4\u597d\u7684\u9605\u8bfb\u4f53\u9a8c\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=12316\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=12316<\/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\/202608\/2026-8-3_210703.webp\" width=\"160\" height=\"119\" alt=\"\u95f4\u9699\u88c5\u9970\u7ebf\u5c01\u9762\u56fe\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>\u95f4\u9699\u88c5\u9970\u7ebf\u5176\u5b9e\u7531\u6765\u5df2\u4e45\uff0c\u4e0d\u8fc7\u4ec5\u652f\u6301\u5782\u76f4\u5206\u9694\u7ebf\uff0c\u4e14\u53ea\u5728Columns\u5e03\u5c40\u4e2d\u6709\u6548\uff0c\u7ecf\u8fc7\u8fd9\u4e48\u591a\u5e74\u7684\u7b49\u5f85\uff0c\u7ec8\u4e8e\uff0cFlex\u548cGrid\u5e03\u5c40\u4e2d\u4e5f\u80fd\u81ea\u5b9a\u4e49\u5206\u5272\u7ebf\u6548\u679c\u5566\uff0c\u4e14\u8fdb\u884c\u4e86\u589e\u5f3a\uff0c\u652f\u6301\u591a\u5c5e\u6027\u503c\u3001\u4ea4\u70b9\u4e2d\u65ad\u8bbe\u7f6e\u3001\u95f4\u8ddd\u8fb9\u7f18\u8ddd\u79bb\u63a7\u5236\u3001repeat()\u51fd\u6570\u8bed\u6cd5\u7b49\uff0c\u5f88\u68d2\u7684\u65b0\u7279\u6027\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":[2142,1335,1618,1347,2143,2150,2149],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/12316"}],"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=12316"}],"version-history":[{"count":7,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/12316\/revisions"}],"predecessor-version":[{"id":12355,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/12316\/revisions\/12355"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=12316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=12316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=12316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}