IntersectionObserver实现图片懒加载效果代码
代码语言:html
所属分类:其他
代码描述:IntersectionObserver实现图片懒加载效果代码
代码标签: IntersectionObserver 图片 懒加载
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" /> <title>BFW NEW PAGE</title> <style> .glaxy img{ width: 100%; height: 100%; } </style> </head> <body> <div class="glaxy"> <img src="//repo.bfw.wiki/bfwrepo/icon/5f7abfbff367a.gif" data-src="//repo.bfw.wiki/bfwrepo/image/5e62ef41353c3.png" class="lazyimg" /> <img src="//repo.bfw.wiki/bfwrepo/icon/5f7abfbff367a.gif" data-src="//repo.bfw.wiki/bfwrepo/image/5e62ef60656fd.png" class="lazyimg" /> <img src="//repo.bfw.wiki/bfwrepo/icon/5f7abfbff367a.gif" data-src="//repo.bfw.wiki/bfwrepo/image/5e62ef41353c3.png" class="lazyimg" /> <img src=&quo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0