公告

昵称:末日笑凌风

园龄:1年11个月

粉丝:36

关注:0

+加关注

日历

<>
日一二三四五六

搜索

博客园随机刷新背景图抓取

按键盘F12键调出开发者工具
然后在控制台输入下面的代码

const bg = Array.from(document.querySelectorAll('*')).find(el=>{
const bgImg = getComputedStyle(el).backgroundImage;
return bgImg && bgImg !== 'none' && bgImg.startsWith('url');
});
console.log(bg ? getComputedStyle(bg).backgroundImage : '没找到');

点击图片链接就可以右键另存为,然后用电脑自带的画图软件打开就可以另存为JPG图片了。

源代码页面ACG

image

posted @ 2026-11-26 11:44  末日笑凌风  阅读(23)  评论(0)    收藏  举报