懶人直接出圖
https://www.shadow-forum.com/api/bing/bing.php

API
- API地址: https://bing.biturl.top
- 調用方式:
HTTP GET
相關參數
resolution壁紙的分辨率.1920為默認值, 你也可以將其設置為1366.formatAPI的調用返回格式, 值可以為json或者image. 如果返回格式設置為image, API會直接跳轉請求到對應的圖片地址.index壁紙的index,默認從0開始。由於Bing壁紙的圖片每日更新,所以通過index值可以獲取之前的圖片。mktBing壁紙的地區參數,默認為zh-CN, 你也可以將其設置為en-US,ja-JP,en-AU,en-UK,de-DE,en-NZ,en-CA。
調用示例
- API請求
1 |
https://bing.biturl.top/?resolution=1920&format=json&index=0&mkt=zh-CN |
- 返回
1 |
{ |
CSS中設置背景圖片
可以使用此API直接在CSS中設置背景圖片:
1 |
background-image: url(https://bing.biturl.top/?resolution=1920&format=image&index=0&mkt=zh-CN); |
