## 1、`position` 可填写的值 - `static`,默认值,遵循正常的文档流。没有任何定位效果,偏移属性 (`top/left/z-index`) 无效 <img width="500" src="https://github.com/user-attachments/assets/6570c3d0-0fa0-4ad5-ae43-c3df4a4fd190" /> - `relative`,元素相对于它在正常流中的原始位置进行偏移。原始文档空间不变 <img width="509" src="https://github.com/user-attachments/assets/5a8b24ab-f730-48ba-bd27-3a16d345c226" /> - `absolute`,元素相对于其最近的**已定位祖先容器**进行定位。脱离文档流。 <img width="511" src="https://github.com/user-attachments/assets/03d58fff-c625-4465-b478-8c865bc0f8ac" /> - `fixed`,元素相对于**页面视口**`(viewport)`进行定位。脱离文档流。不随页面滚动而改变。 - `sticky`,元素表现为 `relative`,直到滚动达到**页面视口阈值**后表现为 `fixed`。填写偏移属性才生效。