1.官网下载:http://www.lokeshdhakar.com/projects/lightbox2/
2.引入js和css
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/lightbox.min.js"></script>
<link href="css/lightbox.css" rel="stylesheet" />
3.单张图片
<a href="img/image-1.jpg" data-lightbox="image-1" data-title="自定义">Image #1</a>
4.多张幻灯片 data-lightbox文件名
<a href="img/image-2.jpg" data-lightbox="roadtrip">Image #2</a>
<a href="img/image-3.jpg" data-lightbox="roadtrip">Image #3</a>
<a href="img/image-4.jpg" data-lightbox="roadtrip">Image #4</a>