# demo-02-object-fit 同一张图,三种填充方式。 ## 运行 直接打开 `index.html`。 ## 观察 - `cover` 填满并裁切,最常用于封面 - `contain` 完整显示并留白,适合图表 - `fill` 拉伸变形,通常不是想要的效果 - 配合固定高度或 `aspect-ratio` 使用