{"id":45553,"date":"2023-10-04T11:59:30","date_gmt":"2023-10-04T03:59:30","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=45553"},"modified":"2023-10-04T22:21:25","modified_gmt":"2023-10-04T14:21:25","slug":"fzhcljdsj","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/45553.html","title":{"rendered":"Float\u8f6c\u6362\uff1a\u4ece\u7406\u89e3\u5230\u5b9e\u8df5"},"content":{"rendered":"

  Float\u8f6c\u6362\u662f\u4e00\u79cd\u5e03\u5c40\u6280\u672f\uff0c\u5b83\u4f7f\u7528CSS\u6d6e\u52a8\u5c5e\u6027\u6765\u63a7\u5236\u5143\u7d20\u7684\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u7075\u6d3b\u7684\u5e03\u5c40\u3002\u672c\u6587\u5c06\u4ecb\u7ecdfloat\u8f6c\u6362\u7684\u57fa\u672c\u539f\u7406\u548c\u5b9e\u8df5\uff0c\u5e76\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u5b83\u6765\u521b\u5efa\u66f4\u52a0\u7075\u6d3b\u548c\u5f3a\u5927\u7684\u5e03\u5c40\u3002<\/p>\n

\u4ec0\u4e48\u662ffloat\u8f6c\u6362\uff1f<\/h2>\n

  Float\u8f6c\u6362\u662f\u4e00\u79cdCSS\u5e03\u5c40\u6280\u672f\uff0c\u5b83\u4f7f\u7528CSS\u6d6e\u52a8\u5c5e\u6027\u6765\u63a7\u5236\u5143\u7d20\u7684\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u7075\u6d3b\u7684\u5e03\u5c40\u3002\u6d6e\u52a8\u5143\u7d20\u53ef\u4ee5\u88ab\u8bbe\u7f6e\u4e3a\u5de6\u53f3\u6d6e\u52a8\uff0c\u6216\u8005\u4e0d\u6d6e\u52a8\uff0c\u4ece\u800c\u5b9e\u73b0\u7075\u6d3b\u7684\u5e03\u5c40\u3002\u6d6e\u52a8\u5143\u7d20\u53ef\u4ee5\u548c\u5176\u4ed6\u5143\u7d20\u4e00\u8d77\u6392\u5217\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u590d\u6742\u7684\u5e03\u5c40\u3002<\/p>\n

  \u6d6e\u52a8\u5143\u7d20\u7684\u57fa\u672c\u539f\u7406<\/h3>\n

  \u6d6e\u52a8\u5143\u7d20\u7684\u57fa\u672c\u539f\u7406\u662f\uff0c\u5f53\u4e00\u4e2a\u5143\u7d20\u88ab\u8bbe\u7f6e\u4e3a\u6d6e\u52a8\u65f6\uff0c\u5b83\u5c06\u4ece\u6587\u6863\u6d41\u4e2d\u60ac\u6d6e\uff0c\u5e76\u88ab\u5176\u4ed6\u5143\u7d20\u56f4\u7ed5\uff0c\u800c\u4e0d\u4f1a\u5f71\u54cd\u6587\u6863\u6d41\u7684\u6392\u7248\u3002\u6d6e\u52a8\u5143\u7d20\u7684\u4f4d\u7f6e\u53ef\u4ee5\u901a\u8fc7CSS\u6d6e\u52a8\u5c5e\u6027\u6765\u63a7\u5236\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u7075\u6d3b\u7684\u5e03\u5c40\u3002<\/p>\n

  \u6d6e\u52a8\u5143\u7d20\u7684\u4f7f\u7528<\/h3>\n

  \u6d6e\u52a8\u5143\u7d20\u53ef\u4ee5\u7528\u4e8e\u521b\u5efa\u590d\u6742\u7684\u5e03\u5c40\uff0c\u4f8b\u5982\u591a\u680f\u5e03\u5c40\u3001\u54cd\u5e94\u5f0f\u5e03\u5c40\u7b49\u3002\u5b83\u53ef\u4ee5\u7528\u4e8e\u8c03\u6574\u5143\u7d20\u7684\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u7075\u6d3b\u7684\u5e03\u5c40\u3002\u6d6e\u52a8\u5143\u7d20\u8fd8\u53ef\u4ee5\u7528\u4e8e\u89e3\u51b3\u6587\u6863\u6d41\u4e2d\u7684\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u4f8b\u5982\u6e05\u9664\u6d6e\u52a8\u3001\u89e3\u51b3\u5143\u7d20\u91cd\u53e0\u7b49\u3002<\/p>\n

float\u8f6c\u6362\u7684\u5b9e\u8df5<\/h2>\n

  float\u8f6c\u6362\u7684\u5b9e\u8df5\u4e3b\u8981\u5305\u62ec\u4e24\u4e2a\u6b65\u9aa4\uff1a\u8bbe\u7f6e\u6d6e\u52a8\u5c5e\u6027\u548c\u8bbe\u7f6e\u5bb9\u5668\u5bbd\u5ea6\u3002\u9996\u5148\uff0c\u9700\u8981\u5728\u9700\u8981\u6d6e\u52a8\u7684\u5143\u7d20\u4e0a\u8bbe\u7f6e\u6d6e\u52a8\u5c5e\u6027\uff0c\u53ef\u4ee5\u4f7f\u7528CSS\u7684float\u5c5e\u6027\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528CSS\u7684display\u5c5e\u6027\u3002\u5176\u6b21\uff0c\u9700\u8981\u8bbe\u7f6e\u5bb9\u5668\u5bbd\u5ea6\uff0c\u4ee5\u786e\u4fdd\u5143\u7d20\u4e0d\u4f1a\u6ea2\u51fa\u5bb9\u5668\u3002<\/p>\n

  \u6e05\u9664\u6d6e\u52a8<\/h3>\n

  \u6e05\u9664\u6d6e\u52a8\u662ffloat\u8f6c\u6362\u7684\u4e00\u4e2a\u91cd\u8981\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u89e3\u51b3float\u5143\u7d20\u6ea2\u51fa\u5bb9\u5668\u7684\u95ee\u9898\u3002\u6e05\u9664\u6d6e\u52a8\u7684\u65b9\u6cd5\u662f\u5728\u5bb9\u5668\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u6e05\u9664\u6d6e\u52a8\u7684\u5143\u7d20\uff0c\u8be5\u5143\u7d20\u7684CSS\u5c5e\u6027\u4e3aclear\uff1aboth\u3002<\/p>\n

  \u89e3\u51b3\u5143\u7d20\u91cd\u53e0<\/h3>\n

  \u89e3\u51b3\u5143\u7d20\u91cd\u53e0\u662ffloat\u8f6c\u6362\u7684\u53e6\u4e00\u4e2a\u91cd\u8981\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u89e3\u51b3float\u5143\u7d20\u91cd\u53e0\u7684\u95ee\u9898\u3002\u89e3\u51b3\u5143\u7d20\u91cd\u53e0\u7684\u65b9\u6cd5\u662f\u5728\u5bb9\u5668\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u5143\u7d20\uff0c\u8be5\u5143\u7d20\u7684CSS\u5c5e\u6027\u4e3aoverflow\uff1ahidden\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  float\u8f6c\u6362\u662f\u4e00\u79cd\u5e03\u5c40\u6280\u672f\uff0c\u5b83\u4f7f\u7528CSS\u6d6e\u52a8\u5c5e\u6027\u6765\u63a7\u5236\u5143\u7d20\u7684\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u7075\u6d3b\u7684\u5e03\u5c40\u3002<\/strong>float\u8f6c\u6362\u7684\u5b9e\u8df5\u5305\u62ec\u8bbe\u7f6e\u6d6e\u52a8\u5c5e\u6027\u548c\u8bbe\u7f6e\u5bb9\u5668\u5bbd\u5ea6\uff0c\u5b83\u8fd8\u53ef\u4ee5\u7528\u4e8e\u89e3\u51b3\u6587\u6863\u6d41\u4e2d\u7684\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u4f8b\u5982\u6e05\u9664\u6d6e\u52a8\u3001\u89e3\u51b3\u5143\u7d20\u91cd\u53e0\u7b49\u3002\u603b\u4e4b\uff0cfloat\u8f6c\u6362\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u52a0\u7075\u6d3b\u548c\u5f3a\u5927\u7684\u5e03\u5c40\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Float\u8f6c\u6362\u662f\u4e00\u79cd\u5e03\u5c40\u6280\u672f\uff0c\u5b83\u4f7f\u7528CSS\u6d6e\u52a8\u5c5e\u6027\u6765\u63a7\u5236\u5143\u7d20\u7684\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u52a0\u7075\u6d3b\u7684\u5e03\u5c40\u3002\u672c\u6587\u5c06\u4ecb\u7ecdfloat\u8f6c\u6362\u7684\u57fa\u672c\u539f\u7406\u548c\u5b9e\u8df5\uff0c\u5e76\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u5b83\u6765\u521b\u5efa\u66f4\u52a0\u7075\u6d3b\u548c\u5f3a\u5927<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-45553","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/45553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=45553"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/45553\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=45553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=45553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=45553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}