因为标准就是这么写的: > [8.3.1 Collapsing > margins](https://link.segmentfault.com/?enc=LoDRLhkXjKh3qL5uh%2BzayA%3D%3D.nLjxdIxgXr0oRiCrcm%2B1DHjsOHwQZNzyHf5cdsncMb%2FO4vF2MfF5UV0FH7PS3CofGuiYCt9FJhDJYtS3xjD2zA%3D%3D) > > * Margins between a floated box and any other box do not collapse (not > even between a float and its in-flow children). > * Margins of elements that establish new block formatting contexts (such > as floats and elements with 'overflow' other than 'visible') do not collapse > with their in-flow children. > * Margins of absolutely positioned boxes do not collapse (not even with > their in-flow children). > * **Margins of inline-block boxes do not collapse (not even with their in-> flow children).** > * ... >