{"id":25879,"date":"2024-11-24T09:49:17","date_gmt":"2024-11-24T01:49:17","guid":{"rendered":"https:\/\/fwq.ai\/blog\/25879\/"},"modified":"2024-11-24T09:49:17","modified_gmt":"2024-11-24T01:49:17","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8flex%e5%b8%83%e5%b1%80%e8%ae%a9%e6%8c%89%e9%92%ae%e6%b5%ae%e5%8a%a8%e5%9c%a8%e7%88%b6%e5%ae%b9%e5%99%a8%e5%8f%b3%e8%be%b9%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/25879\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528Flex\u5e03\u5c40\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173072054323124.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u4f7f\u7528Flex\u5e03\u5c40\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u4f7f\u7528Flex\u5e03\u5c40\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4e2d\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9<\/strong><\/p>\n<p>\u5728flex\u5e03\u5c40\u4e2d\uff0c\u901a\u8fc7\u63a7\u5236\u5b50\u5143\u7d20\u7684\u6392\u5e03\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5404\u79cd\u5e03\u5c40\u6548\u679c\u3002\u5f53\u9700\u8981\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u7236\u5bb9\u5668\u7684 justify-content \u5c5e\u6027\u6765\u5b9e\u73b0\u3002<\/p>\n<p>\u4fee\u6539\u540e\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;style&gt;\n  .container {\n    justify-content: space-between;  \/\/ \u5c06\u5b50\u5143\u7d20\u6392\u5217\u5728\u7236\u5bb9\u5668\u4e24\u7aef\n    display: flex;\n  }\n\n  .item {\n    width: 150px;\n    height: 50px;\n    background-color: antiquewhite;\n    border: 1px solid black;\n    display: inline-block;\n  } \n&lt;\/style&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u89e3\u91ca\uff1a<\/strong><\/p>\n<ul>\n<li>justify-content \u5c5e\u6027\u7528\u4e8e\u63a7\u5236\u5b50\u5143\u7d20\u5728\u7236\u5bb9\u5668\u4e2d\u7684\u6c34\u5e73\u5206\u5e03\u65b9\u5f0f\u3002<\/li>\n<li>space-between \u503c\u4f1a\u5c06\u5b50\u5143\u7d20\u5747\u5300\u5730\u653e\u7f6e\u5728\u7236\u5bb9\u5668\u7684\u4e24\u7aef\u3002<\/li>\n<li>\u8bbe\u7f6e display: flex \u5c5e\u6027\u5c06\u7236\u5bb9\u5668\u53d8\u6210\u4e00\u4e2aflex\u5bb9\u5668\uff0c\u5b50\u5143\u7d20\u5c06\u6309\u7167flex\u5e03\u5c40\u89c4\u5219\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u6837\uff0c\u6309\u94ae\u5c31\u4f1a\u6d6e\u52a8\u5728\u5bb9\u5668\u7684\u53f3\u8fb9\uff0c\u4e0e <\/p>\n<p> \u6807\u7b7e\u4fdd\u6301\u8ddd\u79bb\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u4f7f\u7528Flex\u5e03\u5c40\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e2d\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9 \u5728flex\u5e03\u5c40\u4e2d\uff0c\u901a\u8fc7\u63a7\u5236\u5b50\u5143\u7d20\u7684\u6392\u5e03\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5404\u79cd\u5e03\u5c40\u6548\u679c\u3002\u5f53\u9700\u8981\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u7236\u5bb9\u5668\u7684 justify-content \u5c5e\u6027\u6765\u5b9e\u73b0\u3002 \u4fee\u6539\u540e\u7684\u4ee3\u7801\u5982\u4e0b\uff1a &lt;style&gt; .container { justify-content: space-between; \/\/ \u5c06\u5b50\u5143\u7d20\u6392\u5217\u5728\u7236\u5bb9\u5668\u4e24\u7aef display: flex; } .item { width: 150px; height: 50px; background-color: antiquewhite; border: 1px solid black; display: inline-block; } &lt;\/style&gt; \u767b\u5f55\u540e\u590d\u5236 \u89e3\u91ca\uff1a justify-content \u5c5e\u6027\u7528\u4e8e\u63a7\u5236\u5b50\u5143\u7d20\u5728\u7236\u5bb9\u5668\u4e2d\u7684\u6c34\u5e73\u5206\u5e03\u65b9\u5f0f\u3002 space-between \u503c\u4f1a\u5c06\u5b50\u5143\u7d20\u5747\u5300\u5730\u653e\u7f6e\u5728\u7236\u5bb9\u5668\u7684\u4e24\u7aef\u3002 \u8bbe\u7f6e display: flex \u5c5e\u6027\u5c06\u7236\u5bb9\u5668\u53d8\u6210\u4e00\u4e2aflex\u5bb9\u5668\uff0c\u5b50\u5143\u7d20\u5c06\u6309\u7167flex\u5e03\u5c40\u89c4\u5219\u3002 \u8fd9\u6837\uff0c\u6309\u94ae\u5c31\u4f1a\u6d6e\u52a8\u5728\u5bb9\u5668\u7684\u53f3\u8fb9\uff0c\u4e0e \u6807\u7b7e\u4fdd\u6301\u8ddd\u79bb\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u4f7f\u7528Flex\u5e03\u5c40\u8ba9\u6309\u94ae\u6d6e\u52a8\u5728\u7236\u5bb9\u5668\u53f3\u8fb9\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-25879","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=25879"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25879\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=25879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=25879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=25879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}