【Colorful】更换背景图片,增加必应壁纸
更换 Colorful 模板的背景图片,序号 1~10,共十张图片,jpg 格式。
壁纸图片-缩略图(95x58):/content/templates/colorful/images/bg/tmp
壁纸图片:/content/templates/colorful/images/bg
必应壁纸
/content/templates/colorful/header.php 约 130 行处新增
<li onclick="loadBing()"><a href="javascript:" title="设置网站背景图片为必应壁纸"><i class="fa fa-image"></i> 壁纸</a></li>
/content/templates/colorful/footer.php 标签 </body> 前新增
<script>
function loadBing() {
$(".blackground").fadeOut(100);
$(".bg-image").attr("src", 'https://open.saintic.com/api/bingPic/');
RootCookies.SetCookie("myhk_bg",0,30);
}
</script>
PS:直接调用别人写好的必应壁纸的 API 即可,也可自建必应壁纸 API。
红豆》原创,转载请保留文章出处。
本文链接:https://blog.52linglong.com/course/Colorful-bg-bing.html
版权声明:若无特殊注明,本文为《正文到此结束
发表吐槽
你肿么看?
既然没有吐槽,那就赶紧抢沙发吧!