gpt4 book ai didi

css - margin 崩溃

转载 作者:行者123 更新时间:2023-11-28 08:38:42 24 4
gpt4 key购买 nike

  1. float 框和任何其他框之间的垂直边距是否折叠?
  2. 绝对和相对框的边距是否塌陷?

最佳答案

  1. float 边距不会折叠。根据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. 绝对定位边距不会折叠。据同spec :

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

关于css - margin 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3359661/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com