Files
Knowledge/1 使用/API/背景图 API.md
T

27 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
**Bing 每日美图(无需注册)**
- **接口地址**:https://api.nxvav.cn/api/bing/
- **调节方式**:通过`type`参数控制。默认是横版(`pc`),可改为`mobile`匹配手机
- **优点**:图片质量极高,每日更新(跟Bing搜索主页一样),实现简单
- **缺点**:目前能下载的尺寸选项不多(可选值‘pc’,‘mobile’),未明确支持精确调节
 **LoremFlickr 随机美图(无需注册)**
- **接口地址**:`https://loremflickr.com/{宽度}/{高度}`
- **调节方式**:直接通过URL里的**`{宽度}`和`{高度}`**参数精确控制尺寸(例如`800/600`),灵活性非常高
- **优点**:来源是Flickr的海量图库,种类极其丰富。
- **缺点**:图片**完全随机**,不是"一图惊人"的美,更像随机艺术品
https://loremflickr.com/1920/1080
**Picsum(无需注册)**
- **接口地址**:`https://picsum.photos/{宽度}/{高度}
- **调节方式**:直接传`宽度`和`高度`,或单一个参数(如`/200`)做正方形。支持加`?grayscale`(黑白)、`&blur=2`(模糊)等特效
- **优点**:简单稳定,功能丰富,画质优质(来自Unsplash)[
- **缺点**:如需背景"正好填满任意比例",可能需额外CSS或JS处理。
https://picsum.photos/1920/1080?grayscale&blur=2