示例工程 48-preprocessors

48-preprocessors/demo-02-mixins/README.md

markdown · 0.3 KB

运行:mixin 与组合

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

# demo-02-mixins

用组合类替代 mixin。

## 运行

直接打开 `index.html`。

## 观察

- `surface` 提供公共外观
- `card-a` / `card-b` 只覆盖差异
- HTML 里能直接看到组合关系
- 不再需要 `@include surface;` 的编译期复制