示例工程 11-positioning
11-positioning/app/README.md
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
# 11-positioning / app
定位实验室:relative 偏移、absolute 角标、fixed 按钮、sticky 标题。
## 运行
```bash
cd tutorials/css
python3 -m http.server 8080
# 打开 http://127.0.0.1:8080/examples/11-positioning/app/
```
## 关键点
- relative 保留原位置,只做视觉偏移
- absolute 找最近的 `position` 非 static 祖先
- fixed 相对视口,不随滚动
- sticky 需要滚动容器与 top 阈值