spotlight实现图片点击弹出lightbox画廊效果代码
代码语言:html
所属分类:画廊相册
代码描述:spotlight实现图片点击弹出lightbox画廊效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> html, body{ width: 100%; height: 100%; margin: 0; padding: 0; border: 0; font-family: Aral, Helvetica, sans-serif; text-align: center; } a{ display: inline-block; } b{ display: block; padding: 10px; } button{ padding: 5px 10px; } img, .image{ width: 30vw; max-width: 300px; margin: 1vh 1vw; } .image{ display: inline-block; height: 20vw; max-height: 200px; background-position: center center; background-repeat: no-repeat; background-size: cover; } .spotlight.image{ cursor: pointer; } </style> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/spotlight.bundle.js"></script> </head> <body> <p class="spotlight-group"> <b>Anchors & Images</b> <a class="spotlight" href="//repo.bfw.wiki/bfwrepo/image/5e62eef0d452a.png" data-description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua."> <img src="//repo.bfw.wiki/bfwrepo/image/5e62eef0d452a.png" alt="Lorem ipsum dolor sit amet"> </a> <a class="spotlight" href="//repo.bfw.wiki/bfwrepo/image/5e62ef20b92ee.png"> <img src="//repo.bfw.wiki/bfwrepo/image/5e62ef20b92ee.png"> </a> <a class="spotlight" href="//repo.bfw.wiki/bfwrepo/image/5e62ef41353c3.png"> <img src="//repo.bfw.wiki/bfwrepo/image/5e62ef41353c3.png"> </a> </p> <b>Custom Elements</b> <div class="spotlight-group"> <div class="spotlight image" data-src="//repo.bfw.wiki/bfwrepo/image/5e62ef60656fd.png" style="background-image:url(//repo.bfw.wiki/bfwrepo/image/5e62ef60656fd.png)"></div> <div class="spotlight image" data-src="//repo.bfw.wiki/bfwrepo/image/5e62ef82c83ea.png" style="background-image:url(//repo.bfw.wiki/bfwrepo/image/5e62ef82c83ea.png)"></div> <div class="spotlight .........完整代码请登录后点击上方下载按钮下载查看
网友评论0