开发者

margin collapsing

  1. Do vertical margins between a floated box and any other box collapse?
  2. Do margins of absolutely and rel开发者_StackOverflowative boxes collapse?


  1. Float margins don't collapse. According to the spec:

    Vertical margins between a floated box and any other box do not collapse (not even between a float and its in-flow children).

  2. Absolute positioned margins don't collapse. According to the same spec:

    Margins of absolutely positioned boxes do not collapse (not even with their in-flow children).


No, margin collapses only between two adjacent block elements when they have margin towards each-other.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜