# 04-cascade-specificity-inheritance / app 层叠与优先级实验室:四条规则竞争、同优先级顺序、继承与 `!important` 例外。 ## 运行 ```bash cd tutorials/css python3 -m http.server 8080 # 打开 http://127.0.0.1:8080/examples/04-cascade-specificity-inheritance/app/ ``` ## 关键点 - `#target` 赢过 `.note` 与 `p` - `.order.last` 与 `.order` 优先级相同,后写的赢 - `color` / `font-family` 会继承,`border` / `background` 不会 - `!important` 能覆盖 ID,但只在必要处使用