{"id":53478,"date":"2024-12-03T08:57:07","date_gmt":"2024-12-03T00:57:07","guid":{"rendered":"https:\/\/fwq.ai\/blog\/53478\/"},"modified":"2024-12-03T08:57:07","modified_gmt":"2024-12-03T00:57:07","slug":"css-%e7%b2%98%e6%80%a7%e5%85%83%e7%b4%a0%e8%b6%85%e5%87%ba%e6%bb%9a%e5%8a%a8%e8%8c%83%e5%9b%b4%ef%bc%8c%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/53478\/","title":{"rendered":"CSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>CSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f <\/h1>\n<p>\u79ef\u7d2f\u77e5\u8bc6\uff0c\u80dc\u8fc7\u79ef\u84c4\u91d1\u94f6\uff01\u6bd5\u7adf\u5728\u6587\u7ae0\u5f00\u53d1\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u9047\u5230\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u5f80\u5f80\u90fd\u662f\u4e00\u4e9b\u7ec6\u8282\u77e5\u8bc6\u70b9\u8fd8\u6ca1\u6709\u638c\u63e1\u597d\u800c\u5bfc\u81f4\u7684\uff0c\u56e0\u6b64\u57fa\u7840\u77e5\u8bc6\u70b9\u7684\u79ef\u7d2f\u662f\u5f88\u91cd\u8981\u7684\u3002\u4e0b\u9762\u672c\u6587\u300aCSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f \u300b\uff0c\u5c31\u5e26\u5927\u5bb6\u8bb2\u89e3\u4e00\u4e0b\u77e5\u8bc6\u70b9\uff0c\u82e5\u662f\u4f60\u5bf9\u672c\u6587\u611f\u5174\u8da3\uff0c\u6216\u8005\u662f\u60f3\u641e\u61c2\u5176\u4e2d\u67d0\u4e2a\u77e5\u8bc6\u70b9\uff0c\u5c31\u8bf7\u4f60\u7ee7\u7eed\u5f80\u4e0b\u770b\u5427~<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241130\/1732973986674b15a2ee648.jpg\" class=\"aligncenter\" title=\"CSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" alt=\"CSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>CSS \u7c98\u6027\u5143\u7d20\u95ee\u9898\u5b9a\u4f4d<\/strong><\/p>\n<p>\u5728\u63d0\u4f9b\u7684 HTML \u548c CSS \u4ee3\u7801\u4e2d\uff0c\u5b58\u5728\u4e00\u4e2a\u95ee\u9898\uff1a\u5f53\u5de6\u53f3\u6eda\u52a8\u8868\u683c\u8d85\u8fc7 300px \u65f6\uff0c\u7c98\u6027\u5143\u7d20\uff08\u8868\u5934\u548c\u5de6\u4fa7\u6570\u636e\u683c\uff09\u4e0d\u518d\u7c98\u4f4f\u3002<\/p>\n<p><strong>\u95ee\u9898\u539f\u56e0<\/strong><\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u7c98\u6027\u5143\u7d20\u4f1a\u7c98\u9644\u5230\u5176\u6700\u8fd1\u7684\u5177\u6709\u6eda\u52a8\u673a\u5236\u7684\u7956\u5148\u5143\u7d20\u3002\u5728\u7ed9\u5b9a\u7684\u4ee3\u7801\u4e2d\uff0c\u8fd9\u4e2a\u7956\u5148\u5143\u7d20\u662f .table-container\uff0c\u5b83\u9650\u5236\u4e86\u7c98\u6027\u5143\u7d20\u7684\u7c98\u9644\u8303\u56f4\u4e3a 300px \u7684\u5bbd\u5ea6\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n<p>\u8981\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u66f4\u6539 .table-body \u7684 display \u5c5e\u6027\u4e3a flex\uff1a<\/p>\n<pre>.table-body {\n    display: flex;\n}<\/pre>\n<p>\u8fd9\u6837\u4e00\u6765\uff0c\u7c98\u6027\u5143\u7d20\u5c06\u201c\u7c98\u201d\u5230\u5b83\u7684\u76f4\u7cfb\u7956\u5148\u5143\u7d20 .table-body\uff0c\u800c\u4e0d\u662f\u5176\u7956\u5148\u5143\u7d20\u7684\u7956\u5148\u5143\u7d20 .table-container\u3002.table-body \u7684\u5bbd\u5ea6\u4e0d\u518d\u56fa\u5b9a\u4e3a 300px\uff0c\u56e0\u6b64\u7c98\u6027\u5143\u7d20\u53ef\u4ee5\u5728\u8868\u683c\u5de6\u53f3\u6eda\u52a8\u65f6\u59cb\u7ec8\u4fdd\u6301\u7c98\u9644\u72b6\u6001\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u672c\u6587\u5230\u6b64\u7ed3\u675f\uff0c\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u300aCSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f \u300b\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff0c\u7ed9\u5927\u5bb6\u5206\u4eab\u66f4\u591a\u6587\u7ae0\u77e5\u8bc6\uff01<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   Python unittest \u65e0\u6cd5\u53d1\u73b0\u6d4b\u8bd5\u6587\u4ef6\uff1f\u5982\u4f55\u6b63\u786e\u4f7f\u7528unittest discover\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>CSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f \u79ef\u7d2f\u77e5\u8bc6\uff0c\u80dc\u8fc7\u79ef\u84c4\u91d1\u94f6\uff01\u6bd5\u7adf\u5728\u6587\u7ae0\u5f00\u53d1\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u9047\u5230\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u5f80\u5f80\u90fd\u662f\u4e00\u4e9b\u7ec6\u8282\u77e5\u8bc6\u70b9\u8fd8\u6ca1\u6709\u638c\u63e1\u597d\u800c\u5bfc\u81f4\u7684\uff0c\u56e0\u6b64\u57fa\u7840\u77e5\u8bc6\u70b9\u7684\u79ef\u7d2f\u662f\u5f88\u91cd\u8981\u7684\u3002\u4e0b\u9762\u672c\u6587\u300aCSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f \u300b\uff0c\u5c31\u5e26\u5927\u5bb6\u8bb2\u89e3\u4e00\u4e0b\u77e5\u8bc6\u70b9\uff0c\u82e5\u662f\u4f60\u5bf9\u672c\u6587\u611f\u5174\u8da3\uff0c\u6216\u8005\u662f\u60f3\u641e\u61c2\u5176\u4e2d\u67d0\u4e2a\u77e5\u8bc6\u70b9\uff0c\u5c31\u8bf7\u4f60\u7ee7\u7eed\u5f80\u4e0b\u770b\u5427~ CSS \u7c98\u6027\u5143\u7d20\u95ee\u9898\u5b9a\u4f4d \u5728\u63d0\u4f9b\u7684 HTML \u548c CSS \u4ee3\u7801\u4e2d\uff0c\u5b58\u5728\u4e00\u4e2a\u95ee\u9898\uff1a\u5f53\u5de6\u53f3\u6eda\u52a8\u8868\u683c\u8d85\u8fc7 300px \u65f6\uff0c\u7c98\u6027\u5143\u7d20\uff08\u8868\u5934\u548c\u5de6\u4fa7\u6570\u636e\u683c\uff09\u4e0d\u518d\u7c98\u4f4f\u3002 \u95ee\u9898\u539f\u56e0 \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u7c98\u6027\u5143\u7d20\u4f1a\u7c98\u9644\u5230\u5176\u6700\u8fd1\u7684\u5177\u6709\u6eda\u52a8\u673a\u5236\u7684\u7956\u5148\u5143\u7d20\u3002\u5728\u7ed9\u5b9a\u7684\u4ee3\u7801\u4e2d\uff0c\u8fd9\u4e2a\u7956\u5148\u5143\u7d20\u662f .table-container\uff0c\u5b83\u9650\u5236\u4e86\u7c98\u6027\u5143\u7d20\u7684\u7c98\u9644\u8303\u56f4\u4e3a 300px \u7684\u5bbd\u5ea6\u3002 \u89e3\u51b3\u65b9\u6848 \u8981\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u66f4\u6539 .table-body \u7684 display \u5c5e\u6027\u4e3a flex\uff1a .table-body { display: flex; } \u8fd9\u6837\u4e00\u6765\uff0c\u7c98\u6027\u5143\u7d20\u5c06\u201c\u7c98\u201d\u5230\u5b83\u7684\u76f4\u7cfb\u7956\u5148\u5143\u7d20 .table-body\uff0c\u800c\u4e0d\u662f\u5176\u7956\u5148\u5143\u7d20\u7684\u7956\u5148\u5143\u7d20 .table-container\u3002.table-body \u7684\u5bbd\u5ea6\u4e0d\u518d\u56fa\u5b9a\u4e3a 300px\uff0c\u56e0\u6b64\u7c98\u6027\u5143\u7d20\u53ef\u4ee5\u5728\u8868\u683c\u5de6\u53f3\u6eda\u52a8\u65f6\u59cb\u7ec8\u4fdd\u6301\u7c98\u9644\u72b6\u6001\u3002 \u597d\u4e86\uff0c\u672c\u6587\u5230\u6b64\u7ed3\u675f\uff0c\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u300aCSS \u7c98\u6027\u5143\u7d20\u8d85\u51fa\u6eda\u52a8\u8303\u56f4\uff0c\u5982\u4f55\u89e3\u51b3\uff1f \u300b\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff0c\u7ed9\u5927\u5bb6\u5206\u4eab\u66f4\u591a\u6587\u7ae0\u77e5\u8bc6\uff01 Python unittest \u65e0\u6cd5\u53d1\u73b0\u6d4b\u8bd5\u6587\u4ef6\uff1f\u5982\u4f55\u6b63\u786e\u4f7f\u7528unittest discover\uff1f<\/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-53478","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53478","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=53478"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53478\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=53478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=53478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=53478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}