{"id":4123,"date":"2024-11-10T14:36:22","date_gmt":"2024-11-10T06:36:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/4123\/"},"modified":"2024-11-10T14:36:22","modified_gmt":"2024-11-10T06:36:22","slug":"%e5%a6%82%e4%bd%95%e7%94%a8-flex-%e5%b8%83%e5%b1%80%e5%9c%a8%e8%8f%9c%e5%8d%95%e4%b8%ad%e7%bb%98%e5%88%b6%e6%95%b4%e9%bd%90%e5%af%b9%e9%bd%90%e7%9a%84%e5%88%86%e9%9a%94%e8%99%9a%e7%ba%bf%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/4123\/","title":{"rendered":"\u5982\u4f55\u7528 Flex \u5e03\u5c40\u5728\u83dc\u5355\u4e2d\u7ed8\u5236\u6574\u9f50\u5bf9\u9f50\u7684\u5206\u9694\u865a\u7ebf\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173122832785135.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u7528 Flex \u5e03\u5c40\u5728\u83dc\u5355\u4e2d\u7ed8\u5236\u6574\u9f50\u5bf9\u9f50\u7684\u5206\u9694\u865a\u7ebf\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u7528 Flex \u5e03\u5c40\u5728\u83dc\u5355\u4e2d\u7ed8\u5236\u6574\u9f50\u5bf9\u9f50\u7684\u5206\u9694\u865a\u7ebf\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728\u83dc\u5355\u4e2d\u5de7\u5999\u7ed8\u5236\u5206\u9694\u865a\u7ebf\uff1f<\/strong><\/p>\n<p>\u5728\u8bbe\u8ba1\u83dc\u5355\u65f6\uff0c\u6709\u65f6\u6211\u4eec\u9700\u8981\u5728\u83dc\u540d\u548c\u4ef7\u683c\u4e4b\u95f4\u52a0\u5165\u5206\u9694\u7ebf\uff0c\u4ee5\u589e\u5f3a\u83dc\u5355\u7684\u53ef\u8bfb\u6027\u3002\u7136\u800c\uff0c\u5982\u4f55\u7ed8\u5236\u6574\u9f50\u5bf9\u9f50\u7684\u5206\u9694\u7ebf\u5374\u662f\u4e00\u4e2a\u96be\u9898\u3002<\/p>\n<p><strong>\u73b0\u6709\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n<p>\u4e00\u79cd\u5e38\u89c1\u7684\u89e3\u51b3\u65b9\u6848\u662f\u8bbe\u7f6e\u4e00\u4e2a\u57fa\u51c6\u70b9\uff0c\u7136\u540e\u6839\u636e\u83dc\u540d\u548c\u4ef7\u683c\u7684\u957f\u5ea6\u52a8\u6001\u51cf\u5c11\u70b9\u6570\u91cf\u3002\u7136\u800c\uff0c\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u80fd\u4fdd\u8bc1\u5206\u9694\u7ebf\u5b8c\u5168\u5bf9\u9f50\u3002<\/p>\n<p><strong>Flex \u5e03\u5c40\u65b9\u6848<\/strong><\/p>\n<p>\u66f4\u597d\u7684\u529e\u6cd5\u662f\u4f7f\u7528 Flex \u5e03\u5c40\u3002Flex \u5e03\u5c40\u53ef\u4ee5\u6839\u636e\u5bb9\u5668\u7684\u5269\u4f59\u7a7a\u95f4\u7075\u6d3b\u5206\u914d\u5b50\u5143\u7d20\u7684\u5bbd\u5ea6\u3002<\/p>\n<p><strong>\u83dc\u540d\u548c\u4ef7\u683c\u5e03\u5c40<\/strong><\/p>\n<p>\u5bf9\u4e8e\u83dc\u540d\u548c\u4ef7\u683c\uff0c\u53ef\u4ee5\u8bbe\u7f6e flex-grow \u4e3a 0\uff0c\u8fd9\u610f\u5473\u7740\u5b83\u4eec\u53ea\u4f1a\u5360\u636e\u5b9e\u9645\u6240\u9700\u7684\u5bbd\u5ea6\uff0c\u8d85\u51fa\u90e8\u5206\u5c06\u663e\u793a\u7701\u7565\u53f7\u3002<\/p>\n<p><strong>\u5206\u9694\u865a\u7ebf\u5e03\u5c40<\/strong><\/p>\n<p>\u5bf9\u4e8e\u5206\u9694\u865a\u7ebf\uff0c\u53ef\u4ee5\u8bbe\u7f6e flex-grow \u4e3a 1\uff0c\u5e76\u8bbe\u7f6e flex-shrink \u548c flex-basis \u4e3a 100%\u3002\u8fd9\u6837\uff0c\u5206\u9694\u865a\u7ebf\u5c06\u5360\u636e\u5bb9\u5668\u5269\u4f59\u7684\u6240\u6709\u7a7a\u95f4\u3002<\/p>\n<p><strong>\u7ed8\u5236\u865a\u7ebf<\/strong><\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u7ed8\u5236\u5206\u9694\u865a\u7ebf\u3002\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5b9e\u73b0\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528 background-image \u521b\u5efa\u7ebf\u6027\u6e10\u53d8<\/li>\n<li>\u4f7f\u7528\u4f2a\u5143\u7d20\u521b\u5efa\u8fb9\u6846<\/li>\n<li>\u4f7f\u7528\u80cc\u666f\u56fe\u50cf<\/li>\n<\/ul>\n<p>\u9009\u62e9\u6700\u9002\u5408\u4f60\u9700\u6c42\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u901a\u8fc7\u4f7f\u7528 Flex \u5e03\u5c40\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u5bf9\u9f50\u6574\u9f50\u7684\u5206\u9694\u865a\u7ebf\uff0c\u4ece\u800c\u63d0\u5347\u83dc\u5355\u7684\u53ef\u8bfb\u6027\u548c\u7f8e\u89c2\u6027\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7528 Flex \u5e03\u5c40\u5728\u83dc\u5355\u4e2d\u7ed8\u5236\u6574\u9f50\u5bf9\u9f50\u7684\u5206\u9694\u865a\u7ebf\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>\u5982\u4f55\u5728\u83dc\u5355\u4e2d\u5de7\u5999\u7ed8\u5236\u5206\u9694\u865a\u7ebf\uff1f \u5728\u8bbe\u8ba1\u83dc\u5355\u65f6\uff0c\u6709\u65f6\u6211\u4eec\u9700\u8981\u5728\u83dc\u540d\u548c\u4ef7\u683c\u4e4b\u95f4\u52a0\u5165\u5206\u9694\u7ebf\uff0c\u4ee5\u589e\u5f3a\u83dc\u5355\u7684\u53ef\u8bfb\u6027\u3002\u7136\u800c\uff0c\u5982\u4f55\u7ed8\u5236\u6574\u9f50\u5bf9\u9f50\u7684\u5206\u9694\u7ebf\u5374\u662f\u4e00\u4e2a\u96be\u9898\u3002 \u73b0\u6709\u89e3\u51b3\u65b9\u6848 \u4e00\u79cd\u5e38\u89c1\u7684\u89e3\u51b3\u65b9\u6848\u662f\u8bbe\u7f6e\u4e00\u4e2a\u57fa\u51c6\u70b9\uff0c\u7136\u540e\u6839\u636e\u83dc\u540d\u548c\u4ef7\u683c\u7684\u957f\u5ea6\u52a8\u6001\u51cf\u5c11\u70b9\u6570\u91cf\u3002\u7136\u800c\uff0c\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u80fd\u4fdd\u8bc1\u5206\u9694\u7ebf\u5b8c\u5168\u5bf9\u9f50\u3002 Flex \u5e03\u5c40\u65b9\u6848 \u66f4\u597d\u7684\u529e\u6cd5\u662f\u4f7f\u7528 Flex \u5e03\u5c40\u3002Flex \u5e03\u5c40\u53ef\u4ee5\u6839\u636e\u5bb9\u5668\u7684\u5269\u4f59\u7a7a\u95f4\u7075\u6d3b\u5206\u914d\u5b50\u5143\u7d20\u7684\u5bbd\u5ea6\u3002 \u83dc\u540d\u548c\u4ef7\u683c\u5e03\u5c40 \u5bf9\u4e8e\u83dc\u540d\u548c\u4ef7\u683c\uff0c\u53ef\u4ee5\u8bbe\u7f6e flex-grow \u4e3a 0\uff0c\u8fd9\u610f\u5473\u7740\u5b83\u4eec\u53ea\u4f1a\u5360\u636e\u5b9e\u9645\u6240\u9700\u7684\u5bbd\u5ea6\uff0c\u8d85\u51fa\u90e8\u5206\u5c06\u663e\u793a\u7701\u7565\u53f7\u3002 \u5206\u9694\u865a\u7ebf\u5e03\u5c40 \u5bf9\u4e8e\u5206\u9694\u865a\u7ebf\uff0c\u53ef\u4ee5\u8bbe\u7f6e flex-grow \u4e3a 1\uff0c\u5e76\u8bbe\u7f6e flex-shrink \u548c flex-basis \u4e3a 100%\u3002\u8fd9\u6837\uff0c\u5206\u9694\u865a\u7ebf\u5c06\u5360\u636e\u5bb9\u5668\u5269\u4f59\u7684\u6240\u6709\u7a7a\u95f4\u3002 \u7ed8\u5236\u865a\u7ebf \u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u7ed8\u5236\u5206\u9694\u865a\u7ebf\u3002\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5b9e\u73b0\uff1a \u4f7f\u7528 background-image \u521b\u5efa\u7ebf\u6027\u6e10\u53d8 \u4f7f\u7528\u4f2a\u5143\u7d20\u521b\u5efa\u8fb9\u6846 \u4f7f\u7528\u80cc\u666f\u56fe\u50cf \u9009\u62e9\u6700\u9002\u5408\u4f60\u9700\u6c42\u7684\u65b9\u6cd5\u3002 \u901a\u8fc7\u4f7f\u7528 Flex \u5e03\u5c40\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u5bf9\u9f50\u6574\u9f50\u7684\u5206\u9694\u865a\u7ebf\uff0c\u4ece\u800c\u63d0\u5347\u83dc\u5355\u7684\u53ef\u8bfb\u6027\u548c\u7f8e\u89c2\u6027\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7528 Flex \u5e03\u5c40\u5728\u83dc\u5355\u4e2d\u7ed8\u5236\u6574\u9f50\u5bf9\u9f50\u7684\u5206\u9694\u865a\u7ebf\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-4123","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/4123","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=4123"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/4123\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=4123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=4123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=4123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}