Css包含块本页总览包含块2023年02月15日柏拉文越努力,越幸运 一、认识 元素的尺寸及位置,常常会受它的**包含块(containing block)**所影响。对于一些属性,例如 width, height, padding, margin,绝对定位元素的偏移值(比如 position 被设置为 absolute 或 fixed),当我们对其赋予百分比值时,这些值的计算值,就是通过元素的包含块计算得来。 二、规则