{"rsdb":{"rid":"377573","subhead":"","postdate":"0","aid":"264204","fid":"107","uid":"1","topic":"1","content":"
\n

\u6211\u4eec\u5728\u7f16\u5199\u7f51\u9875\u4ee3\u7801\u65f6\uff0c\u9996\u5148\u5e94\u8be5\u505a\u7684\u5c31\u662f\u8bbe\u8ba1\u597d\u9875\u9762\u7684\u5e03\u5c40\u5f62\u5f0f\uff0c\u7136\u540e\u518d\u5f80\u91cc\u9762\u586b\u5145\u5185\u5bb9\u3002\u7f51\u9875\u5e03\u5c40\u7684\u597d\u4e0e\u574f\uff0c\u76f4\u63a5\u51b3\u5b9a\u4e86\u7f51\u9875\u6700\u7ec8\u7684\u5c55\u793a\u6548\u679c\u3002PC\u7aef\u5e38\u89c1\u7684\u7f51\u9875\u5e03\u5c40\u5f62\u5f0f\u6709\u4e24\u5217\u5e03\u5c40\u3001\u4e09\u5217\u5e03\u5c40\u7b49\u3002\u5728CSS\u4e2d\uff0c\u6211\u4eec\u901a\u5e38\u4f7f\u7528\u6d6e\u52a8(float)\u3001\u5b9a\u4f4d(position)\u3001\u663e\u793a\u6a21\u5f0f(display)\u76f8\u5173\u5c5e\u6027\u7ed3\u5408\u4f7f\u7528\uff0c\u4ee5\u8fbe\u5230\u9884\u671f\u6548\u679c\u3002<\/span><\/p> \n

 <\/p> \n

\u4e00\u3000\u3000\u6587\u6863\u6d41<\/strong><\/span><\/p> \n

\u3000\u3000\u6587\u6863\u6d41\u5c31\u662fHTML\u6587\u6863\u5185\u6240\u6709\u5143\u7d20\u6309\u7167\u4e00\u5b9a\u89c4\u5f8b\u6392\u5217\u5e76\u663e\u793a\u7684\u5f62\u5f0f\u3002<\/span><\/p> \n

\u3000\u3000CSS\u6587\u6863\u6d41\u5927\u81f4\u53ef\u4ee5\u5206\u4e3a3\u79cd\uff1a\u6807\u51c6\u6d41\uff0c\u6d6e\u52a8\u6d41\uff0c\u5b9a\u4f4d\u6d41\u3002<\/span><\/p> \n

 <\/p> \n

\u3000\u30001\uff0c\u6807\u51c6\u6d41<\/strong><\/span><\/p> \n

\u3000\u3000\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cHTML\u5143\u7d20\u90fd\u5728\u6807\u51c6\u6d41\u4e2d\u5448\u73b0\u548c\u5c55\u793a\u3002\u6211\u4eec\u4e4b\u524d\u628a\u5143\u7d20\u5206\u4e3a\u5757\u7ea7\u5143\u7d20\uff0c\u884c\u5185\u5143\u7d20\uff0c\u884c\u5185\u5757\u7ea7\u5143\u7d20\uff0c\u4ed6\u4eec\u7684\u7279\u6027\u662f\u5757\u7ea7\u72ec\u5360\u4e00\u884c\uff0c\u884c\u5185\u548c\u884c\u5185\u5757\u7ea7\u53ef\u4ee5\u5728\u4e00\u884c\u5185\u5171\u5b58\uff0c\u8fd9\u4e9b\u7279\u6027\u90fd\u662f\u9488\u5bf9\u6807\u51c6\u6d41\u7684\u3002\u603b\u7ed3\u4e00\u4e0b\u5c31\u662f\uff0c\u6807\u51c6\u6d41\u4e2d\u5143\u7d20\u53ea\u80fd\u5728\u6c34\u5e73\u6216\u5782\u76f4\u65b9\u5411\u4e0a\u6392\u7248\u3002\u5982\u679c\u5143\u7d20\u662f\u5757\u7ea7\u5143\u7d20, \u90a3\u4e48\u5c31\u4f1a\u5782\u76f4\u6392\u7248\uff0c\u5982\u679c\u5143\u7d20\u662f\u884c\u5185\u5143\u7d20\/\u884c\u5185\u5757\u7ea7\u5143\u7d20, \u90a3\u4e48\u5c31\u4f1a\u6c34\u5e73\u6392\u7248\u3002<\/span><\/p> \n

 <\/p> \n

\u3000\u30002\uff0c\u6d6e\u52a8\u6d41<\/strong><\/span><\/p> \n

\u3000\u3000\u6d6e\u52a8\u6d41\u53ea\u6709\u4e00\u79cd\u6392\u7248\u65b9\u5f0f, \u5c31\u662f\u6c34\u5e73\u6392\u7248\u3002 \u5b83\u53ea\u80fd\u8bbe\u7f6e\u67d0\u4e2a\u5143\u7d20\u5728\u7236\u5143\u7d20\u5185\u5de6\u5bf9\u9f50\u6216\u8005\u53f3\u5bf9\u9f50\u3002\u8bbe\u7f6e\u4e86\u6d6e\u52a8\u7684\u5143\u7d20\uff0c\u5c06\u8131\u79bb\u6807\u51c6\u6d41<\/strong>\uff0c\u4e4b\u540e\u5b83\u5c06\u65e0\u89c6\u5143\u7d20\u7684display\u5c5e\u6027\uff0c\u5e76\u4e14\u90fd\u88ab\u5f53\u505a\u5757\u7ea7\u5143\u7d20\u5904\u7406\u3002<\/span><\/p> \n

\n
1<\/span> div<\/span>{\r\n2<\/span>  float<\/span>:left<\/span>;\/*\u89c4\u5b9a\u5143\u7d20\u5411\u5de6\u6d6e\u52a8*\/ <\/span>3<\/span>     \/*<\/span>float:right;\u89c4\u5b9a\u5143\u7d20\u5411\u53f3\u6d6e\u52a8<\/span>*\/<\/span>\r\n4<\/span> }<\/span><\/pre> \n <\/div> \n 

\u3000\u3000\u8bf7\u6ce8\u610f\uff0c\u6d6e\u52a8float\u5c5e\u6027\u6ca1\u6709center\u53d6\u503c\uff0c\u5e76\u4e14\uff0c\u5982\u679c\u8bbe\u7f6e\u4e86\u6d6e\u52a8\u5c5e\u6027\uff0c\u90a3\u4e48\u4f60\u5c06\u4e0d\u80fd\u901a\u8fc7\u4f7f\u7528margin:0 auto\uff1b\u5c5e\u6027\u4f7f\u5143\u7d20\u5c45\u4e2d\u3002<\/span><\/p> \n

 <\/p> \n

\u3000\u30003\uff0c\u5b9a\u4f4d\u6d41<\/strong><\/span><\/p> \n

\u3000\u3000\u6807\u51c6\u6d41\u548c\u6d6e\u52a8\u6d41\u90fd\u53ea\u80fd\u5728\u6c34\u5e73\u6216\u5782\u76f4\u65b9\u5411\u5e03\u5c40\u5143\u7d20\uff0c\u4f46\u73b0\u5b9e\u662f\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u5728\u4e0a\u4e0b\u5de6\u53f3\u51e0\u4e2a\u65b9\u5411\u4e0a\u540c\u65f6\u504f\u79fb\u5143\u7d20\uff0c\u5b9a\u4f4d\u6d41\u6b63\u662f\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u800c\u8bbe\u8ba1\u7684\u3002\u901a\u8fc7\u8bbe\u7f6e\u5143\u7d20\u7684position\u5c5e\u6027\uff0c\u53ef\u4ee5\u8ba9\u5143\u7d20\u5904\u4e8e\u5b9a\u4e3a\u6d41\u4e2d\uff0c\u5e76\u901a\u8fc7left\u3001right\u3001top\u3001bottom\u5c5e\u6027\u8bbe\u7f6e\u5143\u7d20\u5177\u4f53\u7684\u504f\u79fb\u91cf\u3002<\/span><\/p> \n

\u3000\u3000\u5b9a\u4e3a\u6d41\u5206\u4e3a\u56db\u79cd\uff1a<\/span><\/p> \n

\u3000\u3000\u3000\u3000a) static \u9759\u6001\u5b9a\u4f4d\uff0c\u5b9e\u9645\u4e0a\u6240\u6709\u5143\u7d20\u9ed8\u8ba4\u90fd\u662f\u9759\u6001\u5b9a\u4f4d\u7684\uff0c\u5373\u5904\u4e8e\u6807\u51c6\u6d41\u4e2d\u3002<\/span><\/p> \n

\u3000\u3000\u3000\u3000b) relative \u76f8\u5bf9\u5b9a\u4f4d\uff0c\u5143\u7d20\u4fdd\u7559\u5728\u6807\u51c6\u6d41\u4e2d\u6240\u5360\u7528\u7684\u4f4d\u7f6e\uff0c\u4f46\u5b9e\u9645\u662f\u8fb9\u6846\u53ca\u4ee5\u5185\u7684\u90e8\u5206\u5c06\u663e\u793a\u5728\u504f\u79fb\u4e4b\u540e\u7684\u4f4d\u7f6e<\/strong>\u3002\u5373\u867d\u7136\u5143\u7d20\u5df2\u7ecf\u4e0d\u518d\u539f\u6765\u7684\u4f4d\u7f6e\u4e86\uff0c\u4f46\u4e4b\u524d\u6240\u5360\u7528\u7684\u7a7a\u95f4\u5e76\u4e0d\u4f1a\u88ab\u91ca\u653e\u7ed9\u5176\u4ed6\u6807\u51c6\u6d41\u4e2d\u7684\u5143\u7d20\u3002<\/span><\/p> \n

\u3000\u3000\u3000\u3000c) absolute \u7edd\u5bf9\u5b9a\u4f4d\uff0c\u5143\u7d20\u8131\u79bb\u6807\u51c6\u6d41\uff0c\u6d4f\u89c8\u5668\u628a\u5b83\u89c6\u4f5c\u5757\u7ea7\u5143\u7d20\uff0c\u4e0d\u8bba\u5b9a\u4f4d\u4e4b\u524d\u5b83\u662f\u4f55\u79cd\u5143\u7d20\uff0c\u5176\u4ed6\u5143\u7d20\u4e5f\u5c06\u65e0\u89c6\u5b83\u3002\u7edd\u5bf9\u5b9a\u4f4d\u7684\u504f\u79fb\u91cf\u662f\u76f8\u5bf9\u4e8e\u5176\u6709\u5b9a\u4f4d\u5c5e\u6027\u7684\u7b2c\u4e00\u4e2a\u7956\u5148\u5143\u7d20\u7684<\/strong>\u3002<\/span><\/p> \n

\u3000\u3000\u3000\u3000d) fixed \u56fa\u5b9a\u5b9a\u4f4d\uff0c\u56fa\u5b9a\u5b9a\u4f4d\u548c\u7edd\u5bf9\u5b9a\u4f4d\u76f8\u4f3c\uff0c\u4f46\u5b83\u7684\u504f\u79fb\u91cf\u56fa\u5b9a\u7684\u76f8\u5bf9\u4e8e\u6d4f\u89c8\u5668\u7a97\u53e3\u3002<\/span><\/p> \n

 <\/p> \n

\u4e8c\u3000\u3000\u6d6e\u52a8<\/strong><\/span><\/p> \n

\u3000\u3000\u5f53\u67d0\u4e2a\u5143\u7d20\u6d6e\u52a8\u4e4b\u540e\uff0c\u76f8\u5f53\u4e8e\u4ece\u6807\u51c6\u6d41\u4e2d\u5220\u9664\u4e86\u8be5\u5143\u7d20\uff0c\u6807\u51c6\u6d41\u4e2d\u7684\u5143\u7d20\u5c06\u4f1a\u65e0\u89c6\u6d6e\u52a8\u5143\u7d20\uff0c\u5e76\u4e14\u53ef\u80fd\u88ab\u6d6e\u52a8\u5143\u7d20\u8986\u76d6\u3002<\/span><\/p> \n

\u3000\u3000\u5f53\u6709\u591a\u4e2a\u5143\u7d20\u6d6e\u52a8\u65f6\uff0c\u4ed6\u4eec\u6709\u4ee5\u4e0b\u7279\u70b9\uff1a<\/span><\/p> \n

\u3000\u3000\u3000\u3000a) \u5728\u76f8\u540c\u65b9\u5411\u4e0a\u6d6e\u52a8\u7684\u5143\u7d20\uff0c\u5148\u6d6e\u52a8\u7684\u5143\u7d20\u4f1a\u663e\u793a\u5728\u524d\u9762\u3002<\/span><\/p> \n

\n
1<\/span> .brother1<\/span>{\r\n2<\/span>  float<\/span>:left<\/span>;\r\n3<\/span> }\r\n4<\/span> .brother2<\/span>{\r\n5<\/span>  float<\/span>:left<\/span>;\r\n6<\/span> }\r\n7<\/span> \/*<\/span>brother1\u5c06\u663e\u793a\u5728brother2\u7684\u5de6\u8fb9\uff0c\u5982\u679c\u90fd\u8bbe\u7f6e\u53f3\u6d6e\u52a8\uff0c\u90a3\u4e48brother1\u5c06\u663e\u793a\u5728brother2\u7684\u53f3\u8fb9<\/span>*\/<\/span><\/span><\/pre> \n <\/div> \n 

\u3000\u3000\u3000\u3000b) \u4e0d\u540c\u65b9\u5411\u7684\u6d6e\u52a8\u5143\u7d20\uff0c\u4f1a\u5c3d\u91cf\u53bb\u5bfb\u627e\u5e76\u8d34\u9760\u524d\u9762\u548c\u5b83\u6d6e\u52a8\u65b9\u5411\u76f8\u540c\u7684\u5143\u7d20\u3002\u5982\u679c\u524d\u9762\u6ca1\u6709\u5176\u4ed6\u6d6e\u52a8\u5143\u7d20\uff0c\u90a3\u4e48\u5b83\u5c06\u7d27\u8d34\u5176\u7236\u5143\u7d20\u7684\u8fb9\u754c\u3002<\/span><\/p> \n

\n
 1<\/span> .son1<\/span>{\r\n 2<\/span>  float<\/span>:left<\/span>;\r\n 3<\/span> }\r\n 4<\/span> .son2<\/span>{\r\n 5<\/span>  float<\/span>:right<\/span>;\r\n 6<\/span> }\r\n 7<\/span> .son3<\/span>{\r\n 8<\/span>  float<\/span>:left<\/span>;\r\n 9<\/span> }\r\n10<\/span> \/*<\/span>son1\u548cson3\u4f1a\u5728\u7236\u5143\u7d20\u7684\u5de6\u4fa7\u663e\u793a\uff0c\u5e76\u4e14son3\u7d27\u8ddf\u5728son1\u7684\u540e\u9762\u3002son2\u5219\u5728\u7236\u5143\u7d20\u7684\u53f3\u4fa7\u663e\u793a\uff0c\u7d27\u8d34\u7236\u5143\u7d20\u4e0a<\/span>*\/<\/span><\/span><\/pre> \n <\/div> \n 

\u3000\u3000\u3000\u3000c) \u5982\u679c\u6709\u672a\u6d6e\u52a8\u7684\u5144\u5f1f\u5143\u7d20\uff0c\u90a3\u4e48\u5143\u7d20\u5728\u6d6e\u52a8\u4e4b\u540e\uff0c\u4f1a\u6839\u636e\u5b83\u5728\u6807\u51c6\u6d41\u4e2d\u7684\u4f4d\u7f6e\u786e\u5b9a\u8be5\u5728\u7b2c\u51e0\u884c\u5c55\u793a\u3002<\/strong><\/span><\/p> \n

\n
 1<\/span> .brother1<\/span>{\r\n 2<\/span>  background-color<\/span>:red<\/span>;\r\n 3<\/span>  float<\/span>:left<\/span>;\r\n 4<\/span> }\r\n 5<\/span> .brother2<\/span>{\r\n 6<\/span>  background-color<\/span>:blue<\/span>;\r\n 7<\/span> }\r\n 8<\/span> .brother3<\/span>{\r\n 9<\/span>  background-color<\/span>:yellow<\/span>;\r\n10<\/span>  float<\/span>:left<\/span>;\r\n11<\/span> }\r\n12<\/span> \/*<\/span>\u6700\u7ec8\u6548\u679c\u662f\uff1abrother1\u548cbrother2\u5728\u7b2c\u4e00\u884c\u663e\u793a\uff0c\u4f46brother1\u76d6\u4f4f\u4e86brother2\uff0cbrother3\u5355\u72ec\u5728\u7b2c\u4e8c\u884c\u663e\u793a<\/span>*\/<\/span><\/span><\/pre> \n <\/div> \n 

\u3000\u3000\u6d6e\u52a8\u5143\u7d20\u8fd8\u6709\u4e00\u4e2a\u7279\u70b9\uff1a\u6d6e\u52a8\u5143\u7d20\u4e0d\u4f1a\u6321\u4f4f\u6ca1\u6709\u6d6e\u52a8\u5143\u7d20\u4e2d\u7684\u6587\u5b57, \u6ca1\u6709\u6d6e\u52a8\u7684\u6587\u5b57\u4f1a\u81ea\u52a8\u7ed9\u6d6e\u52a8\u7684\u5143\u7d20\u8ba9\u4f4d\u7f6e\u3002\u8fd9\u624d\u662f\u8bbe\u8ba1\u6d6e\u52a8\u7684\u521d\u8877\u3002<\/strong><\/span><\/p> \n

\u3000\u3000\u5143\u7d20\u6d6e\u52a8\u540e\u4f1a\u5e26\u6765\u4e24\u4e2a\u95ee\u9898\uff0c\u7b2c\u4e00\u4e2a\u662f\u9020\u6210\u7236\u5143\u7d20\u7684\u9ad8\u5ea6\u584c\u9677\uff0cpadding\u548cmargin\u65e0\u6548\u3002\u7b2c\u4e8c\u4e2a\u662f\u88ab\u5176\u4ed6\u5143\u7d20\u65e0\u89c6\uff0c\u51fa\u73b0\u5143\u7d20\u76f8\u4e92\u8986\u76d6\u7684\u73b0\u8c61\u3002\u90a3\u4e48\u8981\u600e\u6837\u624d\u80fd\u6d88\u9664\u6d6e\u52a8\u5bf9\u5176\u4ed6\u5143\u7d20\u7684\u5f71\u54cd\u5462\uff1f\u6211\u4eec\u901a\u8fc7\u4e0b\u9762\u7684\u65b9\u5f0f\u6e05\u9664\u6d6e\u52a8\u5e26\u6765\u7684\u5f71\u54cd\u3002<\/span><\/p> \n

\u3000\u3000a) \u4e3a\u7236\u5143\u7d20\u8bbe\u7f6e\u56fa\u5b9a\u7684\u9ad8\u5ea6\uff08\u89e3\u51b3\u95ee\u9898\u4e00\uff09\u3002<\/span><\/p> \n

\n
1<\/span> father<\/span>{\r\n2<\/span>  heigth<\/span>:100px<\/span>;\r\n3<\/span> }\r\n4<\/span> son<\/span>{\r\n5<\/span>  float<\/span>:left<\/span>;\r\n6<\/span> }<\/span><\/pre> \n <\/div> \n 

\u3000\u3000b) \u4e3a\u7236\u5143\u7d20\u8bbe\u7f6e\u6d6e\u52a8\uff08\u89e3\u51b3\u95ee\u9898\u4e00\uff09\u3002<\/span><\/p> \n

\n
1<\/span> father<\/span>{\r\n2<\/span>  float<\/span>:left<\/span>;\r\n3<\/span> }\r\n4<\/span> son<\/span>{\r\n5<\/span>  float<\/span>:left<\/span>;\r\n6<\/span> }<\/span><\/pre> \n <\/div> \n 

\u3000\u3000c) \u8bbe\u7f6eclear\u5c5e\u6027\u3002clear\u5c5e\u6027\u7684\u529f\u80fd\u662f\u4f7f\u6d6e\u52a8\u5143\u7d20\u4e0d\u53bb\u5bfb\u627e\u76f8\u90bb\u7684\u5176\u4ed6\u6d6e\u52a8\u5143\u7d20\uff0c\u4ece\u800c\u6d88\u9664\u6d6e\u52a8\u5143\u7d20\u5bf9\u5176\u4ed6\u5143\u7d20\u7684\u5f71\u54cd\uff08\u89e3\u51b3\u95ee\u9898\u4e8c\uff09\u3002<\/span><\/p> \n

\n
 1<\/span> father::after<\/span>{\r\n 2<\/span>  content<\/span>:''<\/span>;\r\n 3<\/span>  display<\/span>:block<\/span>;\r\n 4<\/span>  height<\/span>:0<\/span>;\r\n 5<\/span>  clear<\/span>:both<\/span>;\r\n 6<\/span> }\r\n 7<\/span> \/*<\/span>\u4fd7\u79f0\u9694\u5899\u6cd5\uff0c\u6839\u636e\u9700\u8981\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u5728\u6d6e\u52a8\u5143\u7d20\u81ea\u8eab\u6216\u5176\u7236\u5143\u7d20\u4e0a<\/span>*\/<\/span>\r\n 8<\/span> son<\/span>{\r\n 9<\/span>  float<\/span>:left<\/span>;\r\n10<\/span> }<\/span><\/pre> \n <\/div> \n 

\u3000\u3000d) \u4e3a\u7236\u5143\u7d20\u8bbe\u7f6eoverflow:hidden;\u5c5e\u6027\uff08\u89e3\u51b3\u95ee\u9898\u4e8c\uff09\u3002<\/span><\/p> \n

\n
1<\/span> father<\/span>{\r\n2<\/span>  overflow<\/span>:hidden<\/span>;\r\n3<\/span> }\r\n4<\/span> \/*<\/span>\u539f\u7406\u662f\u89e6\u53d1BFC\u673a\u5236<\/span>*\/<\/span>\r\n5<\/span> son<\/span>{\r\n6<\/span>  float<\/span>:left<\/span>;\r\n7<\/span> }<\/span><\/pre> \n <\/div> \n 

 <\/span><\/p> \n

\u4e09\u3000\u3000\u5b9a\u4f4d<\/strong><\/span><\/p> \n

 <\/p> \n

\u3000\u30001\uff0c\u76f8\u5bf9\u5b9a\u4f4d<\/strong><\/span><\/p> \n

\u3000\u3000\u901a\u8fc7\u7ed9\u5143\u7d20\u8bbe\u7f6eposition:relative;\u5c5e\u6027\u8bbe\u7f6e\u5143\u7d20\u76f8\u5bf9\u5b9a\u4f4d\u3002<\/span><\/p> \n

\n
1<\/span> .box<\/span>{\r\n2<\/span>  position<\/span>:relative<\/span>;\r\n3<\/span>  top<\/span>:50px<\/span>;\r\n4<\/span>  left<\/span>:50px<\/span>;\r\n5<\/span> }\r\n6<\/span> \/*<\/span>box\u5143\u7d20\u5c06\u5728\u539f\u6765\u7684\u4f4d\u7f6e\u5411\u4e0b\u548c\u5411\u53f3\u504f\u79fb50px\uff0c\u8bf7\u6ce8\u610f\uff1a\u5728\u5b9a\u4f4d\u6d41\u4e2d\uff0c\u540c\u4e00\u4e2a\u65b9\u5411\u4e0a\u7684\u5b9a\u4f4d\u5c5e\u6027\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21<\/span>*\/<\/span><\/span><\/pre> \n <\/div> \n 

\u3000\u3000\u8bf7\u6ce8\u610f\u5728\u6d4f\u89c8\u5668\u4e2d\u7684\u5750\u6807\u7cfb\u548c\u4e00\u822c\u5750\u6807\u7cfb\u5e76\u4e0d\u76f8\u540c\u3002\u5982\u679c\u4e0d\u6e05\u695a\u8bf7\u770b\u300aCSS\u57fa\u7840\u300b<\/a>\u7b2c4.3\u8282\u3002<\/span><\/p> \n

\u3000\u3000\u5728\u76f8\u5bf9\u5b9a\u4f4d\u4e2d\uff0c\u5b9e\u9645\u4e0a\u5143\u7d20\u5e76\u672a\u8131\u79bb\u6807\u51c6\u6d41\uff0c\u6240\u4ee5\u6d4f\u89c8\u5668\u8fd8\u662f\u4f1a\u533a\u5206\u5b83\u662f\u5426\u662f\u5757\u7ea7\u6216\u5176\u4ed6\u7c7b\u578b\u7684\u5143\u7d20\u3002\u53e6\u5916\uff0c\u8bbe\u7f6e\u5143\u7d20\u7684margin\u5c5e\u6027\uff0c\u5b9e\u9645\u4e0amargin\u533a\u57df\u4f1a\u51fa\u73b0\u5728\u5143\u7d20\u5b9a\u4f4d\u4e4b\u524d\u7684\u4f4d\u7f6e\u3002<\/strong><\/span><\/p> \n

\u3000\u3000<\/span><\/p> \n

\u3000\u30002\uff0c\u7edd\u5bf9\u5b9a\u4f4d<\/strong><\/span><\/p> \n

\u3000\u3000\u901a\u8fc7\u7ed9\u5143\u7d20\u8bbe\u7f6eposition:absolute;\u5c5e\u6027\u8bbe\u7f6e\u5143\u7d20\u7edd\u5bf9\u5b9a\u4f4d\u3002<\/span><\/p> \n

\n
1<\/span> .box<\/span>{\r\n2<\/span>  position<\/span>:absolute<\/span>;\r\n3<\/span>  top<\/span>:50px<\/span>;\r\n4<\/span>  left<\/span>:50px<\/span>;\r\n5<\/span> }\r\n6<\/span> \/*<\/span>box\u5143\u7d20\u5c06\u76f8\u5bf9\u4e8e\u7236\u5143\u7d20\u7684\u5de6\u9876\u70b9\uff08\u5750\u6807\u539f\u70b9\uff09\u5411\u4e0b\u5411\u53f3\u504f\u79fb50px<\/span>*\/<\/span><\/span><\/pre> \n <\/div> \n 

\u3000\u3000\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e\u504f\u79fb\u91cf\uff0c\u9ed8\u8ba4top\u548cleft\u504f\u79fb\u91cf\u4e3a0\u3002\u5982\u679c\u5143\u7d20\u6240\u6709\u7956\u5148\u5143\u7d20\u90fd\u6ca1\u6709\u5b9a\u4f4d\u5c5e\u6027\uff0c\u90a3\u4e48\u5143\u7d20\u5c06\u76f8\u5bf9body\u5143\u7d20\u504f\u79fb\u3002<\/span><\/p> \n

\u3000\u3000\u5728\u4f7f\u7528\u7edd\u5bf9\u5b9a\u4f4d\u65f6\u6709\u4e24\u4e2a\u6ce8\u610f\u70b9\uff1a\u7b2c\u4e00\u4e2a\u662f\u5982\u679c\u7f51\u9875\u5bbd\u9ad8\u8f83\u5927\u65f6\uff08\u5927\u4e8e\u6d4f\u89c8\u5668\u53ef\u89c6\u533a\u5bbd\u9ad8\uff09\uff0c\u5e76\u4e14\u5143","orderid":"0","title":"CSS\u5b9a\u4f4d\u4e0e\u5e03\u5c40(\u4e00)","smalltitle":"","mid":"0","fname":"Web","special_id":"0","bak_id":"0","info":"0","hits":"490","pages":"4","comments":"0","posttime":"2019-10-10 18:15:06","list":"1570702506","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"CSS<\/A> \u5b9a\u4f4d<\/A> \u5e03\u5c40<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"14.17.22.37","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"CSS\u5b9a\u4f4d\u4e0e\u5e03\u5c40","lastview":"1716082005","digg_num":"0","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}