博客园实现刷新页面切换背景图片的效果

参考链接:https://blog.csdn.net/weixin_34396902/article/details/89626401

页面定制css代码

body {
       background: url(填一个能够随机获取图片的API接口) no-repeat top center fixed;
}

随机获取图片的API接口

环境背景

https(推荐):
https://img.xjh.me/random_img.php?type=bg&ctype=nature&return=302
http(更快,快一点点,不安全,可能会被劫持):
http://img.xjh.me/random_img.php?type=bg&ctype=nature&return=302

人物背景

https(推荐):
https://img.xjh.me/random_img.php?type=bg&ctype=acg&return=302
http(更快,快一点点,不安全,可能会被劫持):
http://img.xjh.me/random_img.php?type=bg&ctype=acg&return=302

 

posted @ 2022-05-19 11:18  没有你哪有我  阅读(123)  评论(1)    收藏  举报