会员
众包
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
perfect*
博客园
首页
新随笔
联系
订阅
管理
2019年3月2日
JavaScript数组实现图片轮播
摘要: 最终效果 注:图片来源于百度图片 文件结构: 代码:
阅读全文
posted @ 2019-03-02 22:27 perfect*
阅读(532)
评论(0)
推荐(0)
编辑
公告
$(function() { $('#cnblogs_post_body img').each(function() { let imgSrc = $(this).attr('src'); let year = parseInt(imgSrc.substr(imgSrc.indexOf('g')+1,4)); if(year >= 2022){ imgSrc += `?watermark/2/text/amlndWl5YW4=/font/5a6L5L2T/fontsize/15/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast`; $(this).attr('src', imgSrc) } }) })