{"id":9200,"date":"2020-01-15T00:40:32","date_gmt":"2020-01-14T16:40:32","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=9200"},"modified":"2020-05-25T23:22:49","modified_gmt":"2020-05-25T15:22:49","slug":"css-grid-auto-flow","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2020\/01\/css-grid-auto-flow\/","title":{"rendered":"CSS grid-auto-flow\u6df1\u5165\u7406\u89e3"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=9200\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=9200<\/a><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\/202001-grid-auto-flow.jpg';<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/kaola.jpg\" width=\"480\" height=\"300\" alt=\"\u8003\u62c9\u548c\u6811\" class=\"alignright thumb clip size-medium\" \/><\/p>\n<h3>\u4e00\u3001grid-auto-flow\u51fa\u73b0\u7684\u80cc\u666f<\/h3>\n<p>Grid\u5e03\u5c40\u8981\u60f3\u73a9\u5f97666\uff0c<code>grid-auto-flow<\/code>\u662f\u7ed5\u4e0d\u5f00\u7684\u9700\u8981\u6df1\u5ea6\u638c\u63e1\u7684CSS\u5c5e\u6027\u3002<\/p>\n<p>Grid\u5e03\u5c40\u5c31\u50cf\u519c\u6751\u571f\u6539\u5206\u571f\u5730\u3002<\/p>\n<p>\u653f\u5e9c\u4f1a\u628a\u571f\u5730\u5206\u6210\u4e00\u5757\u4e00\u5757\u7684\uff0c\u7136\u540e\u8fd9\u4e00\u5757\u662f\u5f20\u4e09\u7684\uff0c\u90a3\u4e00\u5757\u662f\u738b\u4e8c\u7684\u3002<\/p>\n<p>\u8fd9\u4e2a\u5212\u5206\u5c31\u662f\u901a\u8fc7<code>grid-template<\/code>\u5c5e\u6027\u3002<\/p>\n<p>\u6bd4\u65b9\u8bf4\uff1a<\/p>\n<pre>.fileds {\r\n    display: grid;\r\n    grid-template: 1fr 1fr \/ 1fr 1fr;\r\n}<\/pre>\n<p>\u5c31\u662f\u628a\u8fd9\u5757\u571f\u5730\u5206\u6210\u4e24\u884c\uff0c\u4e24\u52174\u5757\u7530\u5730\u3002<\/p>\n<p>\u7136\u800c\u5e94\u7528\u5230\u5177\u4f53\u7684\u573a\u666f\uff0c\u4e8b\u60c5\u5f80\u5f80\u5c31\u51fa\u4e4e\u610f\u6599\u7684\u590d\u6742\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<ol>\n<li>\u5982\u679c\u65e5\u540e\u6751\u91cc\u642c\u8fc1\u4e86\u51e0\u6237\u65b0\u4f4f\u6237\uff0c\u90a3\u8be5\u600e\u4e48\u5212\u5206\uff1f<\/li>\n<li>4\u5757\u7530\u5730\u5206\u7ed9\u5f20\u4e09\u548c\u738b\u4e8c\uff0c\u4f60\u8bf4\u662f\u6a2a\u7684\u4e24\u5757\u5730\u7ed9\u5f20\u4e09\u5462\uff0c\u8fd8\u662f\u7ad6\u7684\u4e24\u5757\u5730\u7ed9\u5f20\u4e09\uff1f<\/li>\n<li>\u5b64\u5be1\u8001\u4eba\u674e\u5927\u7237\u8fc7\u4e16\u4e86\uff0c\u4ed6\u7684\u7530\u5730\u662f\u5426\u53ef\u4ee5\u5206\u7ed9\u540e\u9762\u7684\u4eba\uff1f<\/li>\n<\/ol>\n<p>\u8fd9\u4e9b\u610f\u6599\u4e4b\u5916\u7684\u573a\u666f\u5355\u9760<code>grid-template<\/code>\u5c5e\u6027\u80af\u5b9a\u6349\u895f\u89c1\u8098\uff0c\u6b64\u65f6\uff0c\u5c31\u9700\u8981<code>grid-auto-flow<\/code>\u5c5e\u6027\u51fa\u9a6c\u3002<\/p>\n<p><code>grid-auto-flow<\/code>\u5c5e\u6027\u53ef\u4ee5\u5b9a\u4e49Grid\u5e03\u5c40\u4e2d\u6bcf\u4e00\u4e2aGrid\u5b50\u9879\u201c\u81ea\u52a8\u6d41\u52a8\u201d\u72b6\u6001\u3002<\/p>\n<p><strong>\u66f4\u65b0\u4e8e2020-05-25<\/strong><\/p>\n<p>\u8fd9\u91cc\u63d0\u5230\u7684\u6240\u8c13\u7684\u201c\u610f\u6599\u4e4b\u5916\u7684\u573a\u666f\u201d\u4e0e<code>grid-auto-flow<\/code>\u5c5e\u6027\u6bdb\u7ebf\u5173\u7cfb\u90fd\u6ca1\u6709\uff0c\u5176\u5b9e\u662f<code>grid-auto-columns<\/code>\u548c<code>grid-auto-rows<\/code>\u5c5e\u6027\u5e94\u8be5\u505a\u7684\u4e8b\u60c5\u3002<\/p>\n<p><code>grid-auto-flow<\/code>\u5c5e\u6027\u7684\u5730\u65b9\u66f4\u50cf\u662fFlex\u5e03\u5c40\u4e2d\u7684<code>flex-direction<\/code>\u5c5e\u6027\uff0c\u662f\u7528\u6765\u63a7\u5236grid\u5b50\u9879\u7684\u6d41\u5411\u7684\u3002<\/p>\n<h3>\u4e8c\u3001\u4e86\u89e3grid-auto-flow\u7684\u8bed\u6cd5<\/h3>\n<pre>grid-auto-flow: [ row | column ] || dense<\/pre>\n<p>\u56e0\u6b64\uff0c\u4e0b\u9762\u8fd9\u4e9b\u5199\u6cd5\u90fd\u662f\u5408\u6cd5\u7684\uff1a<\/p>\n<pre>grid-auto-flow: row;\r\ngrid-auto-flow: column;\r\ngrid-auto-flow: dense;\r\ngrid-auto-flow: row dense;\r\ngrid-auto-flow: column dense;<\/pre>\n<p>\u5176\u4e2d\uff1a<\/p>\n<dl>\n<dt><strong>row<\/strong><\/dt>\n<dd>\u591a\u7684\u683c\u5b50\u4e00\u884c\u4e00\u884c\u9648\u5217\u3002\u9ed8\u8ba4\u503c\u3002<\/dd>\n<dt><strong>column<\/strong><\/dt>\n<dd>\u591a\u7684\u683c\u5b50\u4e00\u5217\u4e00\u5217\u6392\u5217\u3002<\/dd>\n<dt><strong>dense<\/strong><\/dt>\n<dd>\u591a\u7684\u683c\u5b50\u7a7a\u767d\u586b\u5145\u3002<\/dd>\n<\/dl>\n<p>\u5404\u4e2a\u5173\u952e\u5b57\u503c\u5177\u4f53\u4ec0\u4e48\u610f\u601d\uff0c\u6211\u4eec\u8fd8\u5f97\u770b\u6848\u4f8b\u624d\u80fd\u660e\u767d\u3002<\/p>\n<h3>\u4e09\u3001row\u548ccolumn\u5c5e\u6027\u503c\u57fa\u7840<\/h3>\n<h4>1. \u9ed8\u8ba4\u503crow<\/h4>\n<p>\u4ece\u5929\u4e0a\u6389\u4e0b\u6765\u4e00\u4e2a\u5b9d\u8d1d\u5bb9\u5668\uff0c\u5b9a\u775b\u4e00\u770b\uff0c\u5bb9\u5668\u5143\u7d20\u6807\u7b7e\u540d\u662f<code>zxx-grid<\/code>\uff0c\u597d\u5de7\uff0c\u6b63\u597d\u5e94\u7528\u7684CSS\u58f0\u660e\u5c31\u662f<code>display:grid<\/code>\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n}<\/pre>\n<p>\u7136\u540e\u5f88\u5de7\u7684\u662f\u8fd8\u6709\u82e5\u5e72\u5b50\u5143\u7d20\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;zxx-grid&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b501&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b502&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b503&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b504&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b505&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b506&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b507&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b508&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;\u683c\u5b509&lt;\/zxx-item&gt;\r\n&lt;\/zxx-grid&gt;<\/pre>\n<p><code>&lt;zxx-grid&gt;<\/code>\u5143\u7d20\u9664\u4e86\u5e94\u7528\u4e86<code>display:grid<\/code>\u6ca1\u6709\u4efb\u4f55\u5176\u4ed6CSS\uff0c\u56e0\u6b64\uff0c\u6240\u6709\u7684\u5b50\u5143\u7d20\u7684<code>grid-auto-flow<\/code>\u201c\u81ea\u52a8\u6d41\u52a8\u201d\u7684\u72b6\u6001\u662f\u5176\u9ed8\u8ba4\u503c\u3002<\/p>\n<p><code>grid-auto-flow<\/code>\u7684\u9ed8\u8ba4\u503c\u662f<code>row<\/code>\uff0c<code>row<\/code>\u7684\u4e2d\u6587\u610f\u601d\u662f\u201c\u884c\u201d\uff0c\u4e5f\u5c31\u662f\u6240\u6709\u7684\u5b50\u5143\u7d20\u4e00\u884c\u4e00\u884c\u663e\u793a\uff0c\u4f18\u5148\u6c34\u5e73\u6392\u5217\u3002<\/p>\n<p>\u4e8e\u662f\uff0c\u6700\u7ec8\u7684\u7f51\u683c\u8f6e\u5ed3\u7ed3\u6784\u4f1a\u662f\u4e0b\u56fe\u8fd9\u6837\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-12_231706.png\" width=\"374\" height=\"223\" alt=\"\u683c\u5b50\u5168\u90e8\u90fd\u4e00\u884c\u4e00\u884c\u6392\u5217\" class=\"alignnone size-medium\" \/><\/p>\n<p><strong>\u66f4\u8fdb\u4e00\u6b65<\/strong><\/p>\n<p>\u5982\u679c\u6211\u4eec\u4f7f\u7528<code>grid-template<\/code>\u5c5e\u6027\u6307\u5b9aGrid\u7684\u5217\u6570\u4e3a2\u5217\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n    grid-template: auto \/ 1fr 1fr;\r\n    line-height: 40px;\r\n}<\/pre>\n<p>\u5927\u5bb6\u5c31\u4f1a\u770b\u5230Grid\u5b50\u5143\u7d20\u7684\u6392\u5217\u6d41\u5411\u662f\u4e0b\u9762\u8fd9\u6837\u7684\uff0c\u5148\u662f\u6c34\u5e73\u6392\u5217\uff0c\u7136\u540e\u518d\u5230\u4e0b\u4e00\u884c\u518d\u6c34\u5e73\u6392\u5217\uff0c\u4e00\u76f4\u5230\u6700\u540e\u4e0d\u65ad\u5faa\u73af\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-13_221240.png\" width=\"373\" height=\"256\" alt=\"auto-flow\u4e3arow\u65f6\u5019\u7684\u683c\u5b50\u6d41\u5411\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5927\u5bb6\u53ef\u80fd\u89c9\u5f97\u7406\u6240\u5f53\u7136\u5c31\u5e94\u8be5\u8fd9\u6837\u6392\u5217\uff0c\u592a\u5929\u771f\u4e86\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-13_222050.jpg\" width=\"250\" height=\"140\" alt=\"\u592a\u5929\u771f\u4e86 \u5510\u4e09 \" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5927\u5bb6\u7a0d\u540e\u5bf9\u6bd4<code>column<\/code>\u5c5e\u6027\u503c\u7684\u6548\u679c\u5c31\u77e5\u9053Grid\u5b50\u9879\u7684\u6392\u5217\u987a\u5e8f\u5e76\u4e0d\u662f\u4e00\u6210\u4e0d\u53d8\u7684\u4e86\u3002<\/p>\n<h4>2. \u5173\u952e\u5b57\u503ccolumn<\/h4>\n<p>\u5982\u679c\u6211\u4eec\u8bbe\u7f6e<code>grid-auto-flow<\/code>\u7684\u5c5e\u6027\u503c\u662f<code>column<\/code>\uff0c<code>column<\/code>\u7684\u4e2d\u6587\u610f\u601d\u662f\u201c\u5217\u201d\uff0c\u5219\u8868\u793a\u201c\u81ea\u52a8\u6d41\u52a8\u201d\u72b6\u6001\u7684\u5b50\u5143\u7d20\u5168\u90e8\u90fd\u4e00\u5217\u4e00\u5217\u663e\u793a\u3002<\/p>\n<p>\u5047\u8bbe\u5bb9\u5668\u5143\u7d20CSS\u5982\u4e0b\uff1a<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n    grid-auto-flow: column;\r\n}<\/pre>\n<p>\u5219\u51e0\u4e2a\u5b50\u5143\u7d20\u7684\u5e03\u5c40\u6548\u679c\u4f1a\u662f\u4e0b\u9762\u622a\u56fe\u8fd9\u6837\uff0c\u5168\u90e8\u7eb5\u6392\u4e86\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-12_232204.png\" width=\"369\" height=\"96\" alt=\"\u5e03\u5c40\u7eb5\u6392\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u53d1\u73b0\u6ca1\u6709\uff1f\u4f7f\u7528<code>grid-auto-flow<\/code>\u5c5e\u6027\u53ef\u4ee5\u975e\u5e38\u7b80\u5355\u5b9e\u73b0\u5b50\u5143\u7d20\u4e2a\u6570\u4e0d\u56fa\u5b9a\u7684\u7b49\u5206\u5e03\u5c40\u6548\u679c\uff0c\u5c31\u662f\u503c\u8bbe\u7f6e\u4e3a<code>column<\/code>\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p><strong>\u66f4\u8fdb\u4e00\u6b65<\/strong><\/p>\n<p>\u8fd9\u91cc\uff0c\u6211\u4eec\u540c\u6837\u6307\u5b9a\u6211\u4eec\u7684Grid\u5e03\u5c40\u662f2\u884c\uff0cCSS\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n    grid-template-rows: 1fr 1fr;\r\n    grid-auto-flow: column;\r\n    line-height: 40px;\r\n}<\/pre>\n<p>\u5927\u5bb6\u5c31\u4f1a\u53d1\u73b0Grid\u5b50\u5143\u7d20\u7684\u6392\u5217\u6d41\u5411\u548c<code>row<\/code>\u5c5e\u6027\u503c\u5c31\u4e0d\u4e00\u6837\u4e86\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-13_224442.png\" width=\"372\" height=\"138\" alt=\"grid-auto-flow:column\u683c\u5b50\u7684\u6d41\u5411\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u662f\u4f18\u5148\u5782\u76f4\u65b9\u5411\u6392\u5217\uff0c\u7136\u540e\u518d\u5230\u4e0b\u4e00\u5217\u5f80\u4e0b\u6392\u5217\uff0c\u4e00\u76f4\u5faa\u73af\u5f80\u590d\u5230\u6700\u540e\u4e00\u5217\u3002<\/p>\n<p>\u7531\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u5f97\u51fa\u7ed3\u8bba\uff0c<code>grid-auto-flow<\/code>\u5c5e\u6027\u4f1a\u5f71\u54cdGrid\u5e03\u5c40\u7684\u6392\u5217\u987a\u5e8f\u3002<\/p>\n<h4>3. \u6392\u5e8f\u4e0e\u5e03\u5c40\u5b9e\u4f8b<\/h4>\n<p>\u6709\u4eba\u5728\u5fae\u4fe1\u7c89\u4e1d\u7fa4\u91cc\u9762\u95ee\u4e86\u4e0b\u9762\u8fd9\u4e2a\u95ee\u9898\uff0c\u5b9e\u73b0\u4e0b\u56fe\u6240\u793a\u5e03\u5c40\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/20200113230941.jpg\" width=\"427\" height=\"162\" alt=\"\u56fe\u7247\u5e03\u5c40\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u8fd9\u4e2a\u5e03\u5c40\u6548\u679c\uff0c\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u5c31\u662f\u7528\u6d6e\u52a83\u4e2a\u56fe\u7247\u90fd\u8bbe\u7f6e<code>float:left<\/code>\u5c31\u53ef\u4ee5\u4e86\uff0c\u5c31\u8fd9\u4e48\u7b80\u5355\u3002<\/p>\n<p>\u4f46\u662f\u5982\u679c\u6211\u4eec\u8fd9\u91cc\u7684\u56fe\u7247\u4e0d\u662f3\u4e2a\uff0c\u800c\u662f5\u4e2a\uff08\u5982\u4e0b\u56fe\uff09\uff0c\u90a3\u4e48\u6d6e\u52a8\u5c31\u65e0\u80fd\u4e3a\u529b\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/layout-abc.jpg\" width=\"577\" height=\"162\" alt=\"5\u4e2a\u56fe\u7247\u5e03\u5c40\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6b64\u65f6\uff0c\u5219\u53ef\u4ee5\u8bd5\u8bd5Grid\u5e03\u5c40\uff0c\u8ba9\u7b2c\u4e00\u4e2a\u5b50\u9879\u6a2a\u8de8\u5de6\u4fa7\u4e24\u4e2a\u683c\u5b50\uff0c\u7136\u540e\u540e\u97624\u4e2a\u683c\u5b50\u6309\u7167<code>grid-auto-flow:column<\/code>\u7684\u6d41\u5411\u6392\u5217\u5373\u53ef\u3002<\/p>\n<p>HTML\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;zxx-grid&gt;\r\n    &lt;zxx-item&gt;&lt;img src=\".\/xugou-1.jpg\"&gt;&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;&lt;img src=\".\/xugou-2.jpg\"&gt;&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;&lt;img src=\".\/xugou-3.jpg\"&gt;&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;&lt;img src=\".\/xugou-4.jpg\"&gt;&lt;\/zxx-item&gt;\r\n    &lt;zxx-item&gt;&lt;img src=\".\/xugou-5.jpg\"&gt;&lt;\/zxx-item&gt;\r\n&lt;\/zxx-grid&gt;<\/pre>\n<p>CSS\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n    grid-auto-flow: column;\r\n    grid-template: 1fr 1fr \/ 1fr 1fr 1fr;\r\n    grid-template-areas: \"a b d\" \"a c e\";\r\n    grid-gap: 6px;\r\n}\r\nzxx-item:first-child {\r\n    grid-area: a;    \r\n}<\/pre>\n<p>\u5219\u6709\u5982\u4e0b\u56fe\u6240\u793a\u7684\u5e03\u5c40\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-14_222514.jpg\" width=\"604\" height=\"271\" alt=\"\u6392\u5217\u5e03\u5c40\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u800c\u4e14\u6574\u4e2a\u5e03\u5c40\u662f\u5f39\u6027\u53d8\u5316\u7684\uff0c\u5982\u4e0b\u89c6\u9891\u6240\u793a\uff08\u4e0d\u52a8\u53ef\u4ee5\u70b9\u51fb\u64ad\u653e\uff09\uff1a<\/p>\n<p><video src='\/\/image.zhangxinxu.com\/video\/blog\/202001\/grid-auto-flow.mp4' type=\"video\/mp4\" width=\"620\" height=\"286\" preload=\"auto\" autoplay autobuffer loop x-webkit-airplay=\"allow\" x5-video-player-type=\"h5\" x5-video-player-fullscreen=\"true\" x5-video-orientation=\"portraint\" webkit-playsinline=\"true\" playsinline=\"true\" \u200b\u200b\u200b\u200bposter=\"\/\/image.zhangxinxu.com\/image\/blog\/201806\/poster.png\"><\/video><\/p>\n<p>\u5bf9\u5427\uff0c\u5e03\u5c40\u6548\u679c\u8fd8\u662f\u5f88\u9177\u7684\u3002<\/p>\n<hr>\n<p>\u6700\u540e\uff0c\u6d4b\u8bd5\u4e0b<code>grid-auto-flow:column<\/code>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\u6240\u8d77\u7684\u4f5c\u7528\uff0c\u6211\u4eec\u6253\u5f00\u63a7\u5236\u53f0\uff0c\u6ce8\u91ca\u6389<code>grid-auto-flow:column<\/code>\u8fd9\u53e5CSS\u58f0\u660e\uff0c\u5219\u6211\u4eec\u4f1a\u5f97\u5230\u4e0b\u56fe\u6240\u793a\u7684\u5e03\u5c40\u6548\u679c\uff0c\u56fe2\u5230\u56fe5\u90fd\u662f\u6c34\u5e73\u5e73\u94fa\u5448\u73b0\uff0c\u8fd9\u4e2a\u6548\u679cFloat\u6d6e\u52a8\u5c31\u53ef\u4ee5\u5b9e\u73b0\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-14_224504.png\" width=\"690\" height=\"331\" alt=\"column\u503c\u7684\u4f5c\u7528\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p><strong>\u5bf9\u5e94\u7684Demo\u9875\u9762<\/strong><\/p>\n<p>\u4e0a\u9762\u7684\u4f8b\u5b50\u6709\u4e13\u95e8\u7684demo\u6f14\u793a\u9875\u9762\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u7684\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202001\/grid-column-image-layout-demo.php\" rel=\"noopener\" target=\"_blank\">grid\u5e03\u5c40\u5b9e\u73b0\u56fe\u50cfA|B+C\u5e03\u5c40demo<\/a><\/p>\n<p><span class=\"s\">\/\/zxx: Chrome\u6d4f\u89c8\u5668\u7684\u56fe\u7247height:100%\u4f3c\u4e4e\u6709bug\uff0cFirefox\u6d4f\u89c8\u5668\u6ca1\u6709\u8fd9\u4e2a\u95ee\u9898<\/span><\/p>\n<h3>\u56db\u3001row\u548ccolumn\u5c5e\u6027\u503c\u6df1\u5165<\/h3>\n<p>\u7b2c\u4e09\u5c0f\u8282\u6f14\u793a\u7684\u51e0\u4e2a\u6848\u4f8b\u90fd\u662f\u6211\u4eec\u6240\u6709\u7684\u683c\u5b50\u90fd\u5df2\u7ecf\u89c4\u5b9a\u597d\u7684\uff0c\u4f46\u662f\u5b9e\u9645\u5f00\u53d1\uff0cGrid\u683c\u5b50\u7684\u6570\u91cf\u53ef\u80fd\u662f\u52a8\u6001\u7684\uff0c\u65e0\u8bba\u662f<code>grid-template<\/code>\u8fd8\u662f<code>grid-template-areas<\/code>\u5f80\u5f80\u5c31\u6ca1\u6cd5\u517c\u987e\u5168\u90e8\u7684\u5b50\u5143\u7d20\uff0c\u6b64\u65f6\uff0cGrid\u5e03\u5c40\u53c8\u8be5\u5982\u4f55\u8868\u73b0\uff1f<\/p>\n<p>\u4e3a\u4e86\u66f4\u8fdb\u4e00\u6b65\u5c55\u793a\u5173\u952e\u5b57\u503c<code>column<\/code>\u7684\u6548\u679c\uff0c\u6211\u4eec\u6765\u770b\u4e00\u4e2a\u7a0d\u5fae\u518d\u590d\u6742\u4e00\u70b9\u7684\u4f8b\u5b50\uff1a<\/p>\n<p>\u6211\u4eec\u8bbe\u5b9a\u7f51\u683c\u6a21\u677f\u662f 2 x 2\uff0c\u4e5f\u5c31\u662f\u524d4\u4e2a\u5143\u7d20\u6309\u7167\u6307\u5b9a\u7f51\u683c\u9648\u5217\uff0c\u540e\u9762\u7684\u5b50\u5143\u7d20auto-flow\u81ea\u7531\u6d41\u52a8\u3002\u76f8\u5173CSS\u5982\u4e0b\uff1a<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n    grid-template: 1fr 1fr \/ 1fr 1fr;\r\n    grid-auto-flow: column;\r\n}<\/pre>\n<p>\u5219\u6700\u7ec8\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-12_233108.png\" width=\"372\" height=\"89\" alt=\"\u672a\u5b9a\u4e49\u7f51\u683c\u7684column\u6392\u5217\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4e3a\u4ec0\u4e48\u4f1a\u6709\u4e0a\u56fe\u8fd9\u6837\u7684\u6548\u679c\u5462\uff1f<\/p>\n<p>\u9996\u5148\u5927\u5bb6\u4e00\u5b9a\u8981\u641e\u6e05\u695a\u4e00\u70b9\uff0c<code>1fr 1fr<\/code>\u5e76\u4e0d\u7b49\u4e8e<code>50% 50%<\/code>\uff0c\u867d\u7136\u5f88\u591a\u65f6\u5019\u8868\u73b0\u662f\u4e00\u6837\u7684\uff0c\u4f46\u53ea\u662fgrid\u683c\u5b50\u6b63\u597d\u548c\u8bbe\u5b9a\u6570\u91cf\u4e00\u81f4\u7684\u65f6\u5019\u3002<code>1fr 1fr<\/code>\u66f4\u51c6\u786e\u7684\u542b\u4e49\u662f\uff0c\u53ef\u7528\u5269\u4f59\u7a7a\u95f4\u5206\u522b<code>50% 50%<\/code>\u3002<\/p>\n<p>\u5728\u672c\u4f8b\u4e2d\uff0c\u683c\u5b505~\u683c\u5b509\u5c5e\u4e8e\u201c\u653e\u4efb\u81ea\u6d41\u201d\u7684\u76d2\u5b50\uff0c\u56e0\u4e3a<code>grid-template:1fr 1fr \/ 1fr 1fr<\/code>\u53ea\u6307\u5b9a\u4e864\u4e2a\u683c\u5b50\u7684\u5c3a\u5bf8\uff0c\u90a3\u5269\u4f59\u76845\u4e2a\u683c\u5b50\u600e\u4e48\u529e\u5462\uff1f<\/p>\n<p>\u90a3\u5c31\u662f<code>grid-auto-flow<\/code>\u5c5e\u6027\u5927\u53d1\u795e\u5a01\u7684\u65f6\u5019\u3002<\/p>\n<p>\u8fd9\u91cc<code>grid-auto-flow<\/code>\u8bbe\u7f6e\u7684\u5c5e\u6027\u503c\u662f<code>column<\/code>\uff0c\u4e5f\u5c31\u662f\u6ca1\u6709\u6307\u5b9a\u6a21\u677f\u7684\u5269\u4f595\u4e2a\u683c\u5b50\u5782\u76f4\u6309\u9700\u6392\u5217\u3002\u5982\u4e0b\u56fe\u6807\u6ce8\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-14_230408.png\" width=\"373\" height=\"92\" alt=\"5\u4e2a\u683c\u5b50\u6392\u5217\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u7531\u4e8e\u6ca1\u6709\u6307\u5b9a\u5bbd\u5ea6\uff0c\u56e0\u6b64\uff0c\u683c\u5b50\u7684\u5c3a\u5bf8\u5c31<code>fit-content<\/code>\uff0c\u6839\u636e\u5185\u5bb9\u7684\u5c3a\u5bf8\u6765\u3002<\/p>\n<hr>\n<p>\u5728\u5b9e\u9645\u5f00\u53d1\u7684\u65f6\u5019\uff0c\u6211\u4eec\u5f80\u5f80\u53ea\u8981\u6307\u5b9a\u597d\u5782\u76f4\u5217\u7684\u4e2a\u6570\u548c\u5bbd\u5ea6\u5206\u914d\u6bd4\uff0c\u65e0\u8bba\u591a\u5c11\u4e2agrid\u5b50\u5143\u7d20\uff0c\u90fd\u4f1a\u4f9d\u6b21\u6392\u5217\u597d\uff0c\u5176\u6700\u5e95\u5c42\u6700\u6839\u672c\u7684\u539f\u56e0\u5176\u5b9e\u662f<code>grid-auto-flow:row<\/code>\u5728\u8d77\u4f5c\u7528\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n    grid-template-columns: 1fr 1fr;\r\n}<\/pre>\n<p>\u6548\u679c\u662f\u4e0b\u9762\u8fd9\u6837\uff0c9\u4e2a\u683c\u5b50\u4e86\uff0c\u4e00\u4e2a\u4e00\u4e2a\u6392\u7684\u975e\u5e38\u6574\u9f50\uff0c\u56e0\u4e3a\u201c\u81ea\u52a8\u6d41\u52a8\u201d\u9ed8\u8ba4\u662f\u6c34\u5e73\u7684\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-14_231152.png\" width=\"369\" height=\"145\" alt=\"9\u4e2a\u683c\u5b50\u9ed8\u8ba4\u6392\u5217\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u4e94\u3001\u4e0d\u592a\u597d\u61c2\u7684dense\u5c5e\u6027\u503c<\/h3>\n<p>\u6700\u540e\uff0c\u518d\u8bb2\u8bb2<code>dense<\/code>\u5c5e\u6027\u503c\u3002<\/p>\n<p><code>dense<\/code>\u5355\u4ece\u5b57\u9762\u542b\u4e49\u662f\u4e0d\u592a\u597d\u7406\u89e3\u7684\uff0c<code>dense<\/code>\u7684\u4e2d\u6587\u610f\u601d\u662f\u201c\u5bc6\u96c6\u7684\u201d\uff0c\u201c\u7a20\u5bc6\u7684\u201d\uff0c\u201c\u6d53\u5bc6\u7684\u201d\u3002<\/p>\n<p>\u5bc6\u96c6\u7684\u662f\u6811\u6797\uff0c\u7a20\u5bc6\u7684\u662f\u5976\u6614\uff0c\u6d53\u5bc6\u7684\u662f\u5934\u53d1\uff0c\u8ddfGrid\u5e03\u5c40\u597d\u50cf\u4e0d\u642d\u8fb9\u5427\u3002<\/p>\n<p>\u5b9e\u9645\u4e0a\uff0c\u8fd9\u91cc<code>dense<\/code>\u5e94\u8be5\u7528\u4e00\u79cd\u66f4\u611f\u6027\u7684\u65b9\u5f0f\u53bb\u4f53\u4f1a\u8fd9\u4e2a\u8bcd\u7684\u542b\u4e49\u3002<\/p>\n<p>\u5728\u672c\u6587\u4e00\u5f00\u59cb\u63d0\u5230\u4e86\u4e00\u4e2a\u5f15\u5b50\u201c\u5b64\u5be1\u8001\u4eba\u674e\u5927\u7237\u8fc7\u4e16\u4e86\uff0c\u4ed6\u7684\u7530\u5730\u662f\u5426\u53ef\u4ee5\u5206\u7ed9\u540e\u9762\u7684\u4eba\uff1f\u201d<\/p>\n<p>\u6bd4\u5982\u8bf4\u6751\u91cc9\u6237\u4eba\u5bb6\uff0c\u6bcf\u4e00\u6237\u90fd\u5206\u5f97\u4e86\u4e00\u5757\u7530\u5730\uff0c\u5927\u5bb6\u7684\u7530\u5730\u90fd\u662f\u7d27\u5bc6\u76f8\u8fde\u7684\u3002<\/p>\n<p>\u7ed3\u679c\u5b64\u5be1\u8001\u4eba\u674e\u5927\u7237\u548c\u738b\u5927\u7237\u76f8\u7ee7\u53bb\u4e16\u3002\u4e8e\u662f\uff0c\u5c31\u6709\u4e24\u5757\u7530\u5730\u662f\u7a7a\u7f3a\u7684\uff0c\u56e0\u4e3a\u6709\u7a7a\u7f3a\uff0c\u6240\u4ee5\u8fd9\u4e2a\u65f6\u5019\uff0c\u5982\u679c\u6211\u4eec\u4f7f\u7528\u65e0\u4eba\u673a\u4ece\u4e0a\u65b9\u62cd\u4e00\u4e2a\u7167\u7247\uff0c\u5219\u7530\u5730\u662f\u7a00\u758f\u7684\uff0c\u4e0d\u662f\u7d27\u5bc6\u7684\u3002<\/p>\n<p>\u8fd9\u4e2a\u65f6\u5019\uff0c\u6751\u91cc\u53c8\u6765\u4e86\u4e24\u6237\u65b0\u4eba\u5bb6\uff0c\u4e5f\u8981\u5206\u7530\u5730\u3002<\/p>\n<p>\u5982\u679c\u662f<code>dense<\/code>\uff0c\u5219\u4f18\u5148\u5206\u914d\u4e4b\u524d\u674e\u5927\u7237\u548c\u738b\u5927\u7237\u7559\u4e0b\u7684\u7a7a\u7f3a\u7684\u571f\u5730\uff0c\u56e0\u4e3a\u8fd9\u6837\u4f1a\u8ba9\u6574\u7247\u7530\u5730\u6ca1\u6709\u7a7a\u7f3a\uff0c\u662f\u201c\u5bc6\u96c6\u7684\u201d\uff0c\u201c\u7d27\u5bc6\u7684\u201d\u3002<\/p>\n<p><code>grid-auto-flow:dense<\/code>\u4e5f\u662f\u7c7b\u4f3c\u7684\u610f\u601d\u3002<\/p>\n<h4>dense\u7406\u89e3\u6848\u4f8b<\/h4>\n<p>\u6211\u4eec\u53ef\u4ee5\u4eba\u4e3a\u5236\u9020\u51fa\u7a00\u758f\u5e03\u5c40\u7ed3\u6784\uff08\u524d\u9762\u51e0\u4e2aGrid\u683c\u5b50\u7559\u7a7a\uff09\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n    grid-template-columns: 1fr 1fr;\r\n}\r\nzxx-item:first-child {\r\n    grid-column-start: 2;\r\n}<\/pre>\n<p>\u6548\u679c\u5982\u4e0b\uff0c\u7b2c\u4e00\u4e2a\u683c\u5b50\u7a7a\u7f3a\u4e86\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-14_235445.png\" width=\"373\" height=\"146\" alt=\"grid\u5e03\u5c40-\u524d\u9762\u7559\u7a7a\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5982\u679c\u6211\u4eec\u5e0c\u671b\u7b2c\u4e00\u4e2a\u683c\u5b50\u88ab\u5145\u5206\u5229\u7528\uff0c\u8ba9\u6574\u4e2a\u6392\u5217\u662f\u7d27\u5bc6\u76f8\u8fde\u7684\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528<code>dense<\/code>\u5173\u952e\u5b57\u503c\u3002<\/p>\n<pre>zxx-grid {\r\n    display: grid;\r\n    grid-template-columns: 1fr 1fr;\r\n    <span style=\"color:#cd0000;\">grid-auto-flow: dense;<\/span>\r\n}\r\nzxx-item:first-child {\r\n    grid-column-start: 2;\r\n}<\/pre>\n<p>\u6b64\u65f6\u6d4f\u89c8\u5668\u7684\u6e32\u67d3\u8868\u73b0\u662f\u600e\u6837\u7684\u5462\uff1f\u8bf7\u770b\u4e0b\u56fe\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-14_235724.png\" width=\"372\" height=\"143\" alt=\"\u683c\u5b502\u6e32\u67d3\u4e0a\u53bb\u4e86\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u539f\u672c\u6d41\u51fa\u6765\u7684\u7b2c1\u4e2a\u683c\u5b50\u7684\u7a9f\u7abf\uff0c\u88ab\u683c\u5b502\u7ed9\u586b\u4e0a\u4e86\u3002<\/p>\n<p>\u8fd9\u4e2aGrid\u5e03\u5c40\u53c8\u662f\u201c\u7d27\u5bc6\u7684\u201d\u4e86\uff0c\u8fd9\u5c31\u662f<code>dense<\/code>\u5c5e\u6027\u7684\u4f5c\u7528\u3002<\/p>\n<p><code>dense<\/code>\u5b9e\u9645\u5f00\u53d1\u7684\u65f6\u5019\u6709\u4ec0\u4e48\u4f5c\u7528\u5462\uff1f<\/p>\n<p>\u6bd4\u65b9\u8bf4\u6211\u5e0c\u671b\u67d0\u4e24\u4e2a\u76f8\u90bb\u7684\u683c\u5b50\u89c6\u89c9\u987a\u5e8f\u548cDOM\u987a\u5e8f\u662f\u76f8\u53cd\u7684\uff0c\u4e5f\u5c31\u662f\u4e24\u8005\u8c03\u6362\u4f4d\u7f6e\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528<code>dense<\/code>\u5b9e\u73b0\u3002<\/p>\n<h4>\u5176\u4ed6<\/h4>\n<p><code>dense<\/code>\u53ef\u4ee5\u548c<code>row<\/code>\u4ee5\u53ca<code>column<\/code>\u8fd9\u4e24\u4e2a\u5173\u952e\u5b57\u53ea\u662f\u540c\u65f6\u4f7f\u7528\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>grid-auto-flow: row dense;  <span style=\"color:green;\">\/\/ \u7b49\u540c\u4e8edense<\/span>\r\ngrid-auto-flow: column dense;<\/pre>\n<h3>\u516d\u3001\u6700\u540e\u7684\u603b\u7ed3\u4e48\u4e48\u54d2<\/h3>\n<p>\u672c\u6587\u867d\u7136\u53ea\u67095000\u5b57\uff0c\u4e0d\u8fc7\u82b1\u7684\u65f6\u95f4\u8fd8\u633a\u591a\uff0c\u7b97\u4e0a\u4eca\u5929\uff0c\u65ad\u65ad\u7eed\u7eed\u5199\u4e86\u4e00\u5468\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/2020-01-15_001858.png\" width=\"376\" height=\"477\" alt=\"\u4e00\u5468\u8bb0\u5f55\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4e3a\u4ec0\u4e48\u8fd9\u7bc7\u6587\u7ae0\u8de8\u5ea6\u65f6\u95f4\u6bd4\u8f83\u957f\u5462\uff1f\u9664\u4e86\u7528\u5fc3\u505ademo\uff0c\u7528\u5fc3\u521b\u4f5c\u5916\uff0c\u8fd8\u6709\u5176\u4ed6\u4e24\u65b9\u9762\u4e3b\u8981\u539f\u56e0\uff1a<\/p>\n<ol>\n<li>\u8fb9\u7814\u7a76\u8fb9\u6d4b\u8bd5\u8fb9\u5199\uff0c\u7ed3\u679c\u53d1\u73b0\u4e86\u81ea\u5df1\u4e00\u5f00\u59cb\u60f3\u5f53\u7136\u7684\u9519\u8bef\u7406\u89e3\uff0c\u7136\u540e\u4e0d\u5c11\u5185\u5bb9\u91cd\u65b0\u7ec4\u7ec7\u63a8\u7ffb\u91cd\u6765\u3002\u56e0\u6b64\u53ef\u89c1\uff0c\u5199\u6587\u7ae0\u5176\u5b9e\u5bf9\u6df1\u5ea6\u5b66\u4e60\u3001\u4e86\u89e3\u7ec6\u8282\uff0c\u7406\u6e05\u601d\u8def\u975e\u5e38\u6709\u5e2e\u52a9\uff0c\u662f\u975e\u5e38\u597d\u7684\u4e00\u79cd\u5b66\u4e60\u65b9\u6cd5\u3002<\/li>\n<li>\u73b0\u5728\u4e0a\u5e74\u7eaa\u4e86\uff0c\u4f53\u529b\u6ca1\u4ee5\u524d\u597d\u4e86\u3002\u4ee5\u524d\u90fd\u662f\u5199\u52301\u70b9\uff0c\u8fd9\u79cd\u7a0b\u5ea6\u7684\u6587\u7ae02~3\u5929\u5c31\u5b8c\u6210\u3002\u73b0\u5728\u9876\u4e0d\u4f4f\u4e86\uff0c12\u70b9\u5de6\u53f3\u5c31\u56f0\u5f97\u4e0d\u884c\uff0c\u5173\u673a\u7761\u89c9\u53bb\u4e86\uff0c\u6240\u4ee5\u5199\u4f5c\u65f6\u95f4\u8de8\u5ea6\u5c31\u66f4\u957f\u4e86\u3002<\/li>\n<\/ol>\n<p>CSS\u6587\u7ae0\u5df2\u7ecf\u8fde\u66f4\u5341\u51e0\u7bc7\u4e86\uff0c\u5c0f\u672c\u672c\u4e0a\u8fd8\u6709\u597d\u51e0\u7bc7CSS\u6587\u7ae0\u8981\u5199\u7684\u3002<\/p>\n<p>\u5149CSS\u57fa\u7840API\u53ea\u662f\u66f4\u65b0\u8fed\u4ee3\u7684\u4e1c\u897f\u5c31\u8fd9\u4e48\u591a\uff0c\u518d\u8003\u8651\u5230\u5403\u4e86\u6fc0\u7d20\u4e00\u8def\u72c2\u5954\u5e74\u5e74\u66b4\u8d70\u7684ES\u89c4\u8303\uff0c\u73b0\u5728\u7684\u524d\u7aef\u5f00\u53d1\u60f3\u6210\u4e3a\u901a\u624d\u57fa\u672c\u4e0a\u4e0d\u53ef\u80fd\u4e86\uff0c\u53ea\u80fd\u9009\u62e9\u5408\u9002\u7684\u9886\u57df\uff0c\u4e00\u70b9\u4e00\u70b9\u53d1\u5149\u53d1\u70ed\u5427\u3002<\/p>\n<p>\u54ce\u5440\u5440\uff0c\u5c31\u8bf4\u8fd9\u4e48\u591a\u4e86\u3002<\/p>\n<p>\u7528\u5fc3\u4e4b\u4f5c\uff0c\u6b22\u8fce\u5206\u4eab\uff01<\/p>\n<p>\u884c\u6587\u5306\u5fd9\uff0c\u5982\u679c\u6587\u7ae0\u6709\u8868\u8ff0\u4e0d\u51c6\u786e\u7684\u5730\u65b9\uff0c\u6b22\u8fce\u6307\u6b63\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/emtion\/emoji\/1f61d.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=9200\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=9200<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202001\/kaola.jpg\" width=\"160\" height=\"100\" alt=\"\u8003\u62c9\u548c\u6811\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>\u672c\u6587\u5e26\u4f60\u6df1\u5165\u7406\u89e3CSS grid-auto-flow\u5404\u4e2a\u5173\u952e\u8bcd\u7684\u4f5c\u7528\u8868\u73b0\uff0c\u53ef\u4ee5\u66f4\u52a0\u660e\u767dGrid\u5e03\u5c40\u4e3a\u4f55\u4f1a\u6709\u8fd9\u6837\u7684\u8868\u73b0\uff0c\u540c\u65f6\u6f14\u793agrid-auto-flow\u72ec\u6709\u7684\u5b9e\u7528\u5e03\u5c40\u573a\u666f\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":[1271,315,1347,1356,1355,1537,1358,1350,1463,1538,1514],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/9200"}],"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=9200"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/9200\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=9200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=9200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=9200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}