淘客熙熙

主题:【原创】CSS中相对位置、绝对位置的邪门问题 -- 铁手

  • 共: 💬 8 🌺 10
这篇文章解释得比较清楚

http://www.complexspiral.com/publications/uncollapsing-margins/

http://www.w3.org/TR/CSS21/box.html#collapsing-margins:

The top margin of an in-flow block-level element is adjoining to its first in-flow block-level child's top margin if the element has no top border, no top padding, and the child has no clearance.



有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河