在 SAP Spartacus 的scss文件实现里,能观察到很多position property具有不同的值:absolute 或者 relative:
position属性的初始值为static.
首先需要了解css里的三种positioning scheme.
In CSS 2.1, a box may be laid out according to three positioning schemes.
Boxes in the normal flow belong to a formatting context, which may be block or inline, but not both simultaneously. Block-level boxes participate in a block formatting context. Inline-level boxes participate in an inline formatting context.
normal flow里的boxes属于某一种格式化上下文,block或者inline仅居其一,但是不能同时属于二者。