示例工程 13-images

13-images/app/README.md

markdown · 0.4 KB

运行:图片与替代文本 · img / alt / 尺寸

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

# 13-images / app

图片的替代文本、宽高与加载策略。

## 运行

```bash
cd tutorials/html
python3 -m http.server 8080
# 打开 http://127.0.0.1:8080/examples/13-images/app/
```

## 观察

- 信息图 alt 描述内容与趋势
- 装饰图 alt=""
- 功能图 alt 描述动作
- 每张图都有 width/height,避免布局跳动
- 首屏主图不懒加载,下方图片 loading="lazy"