1、调用CSS样式:
<link rel="stylesheet" type="text/css" href="css/default.css">
<link href="dist/css/lightgallery.css" rel="stylesheet">
2、调用JS插件代码:
<script src="http://libs.useso.com/js/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
<script>window.jQuery || document.write('<script src="js/jquery-2.1.1.min.js"><\/script>')</script>
<script type="text/javascript">
$(document).ready(function(){
$('#lightgallery').lightGallery();
});
</script>
<script src="js/picturefill.min.js"></script>
<script src="dist/js/lightgallery.js"></script>
<script src="dist/js/lg-fullscreen.js"></script>
<script src="dist/js/lg-thumbnail.js"></script>
<script src="dist/js/lg-video.js"></script>
<script src="dist/js/lg-autoplay.js"></script>
<script src="dist/js/lg-zoom.js"></script>
<script src="dist/js/lg-hash.js"></script>
<script src="dist/js/lg-pager.js"></script>
<script src="lib/jquery.mousewheel.min.js"></script>
3、添加HTML代码:
将<!--效果html开始-->......<!--效果html结束-->之间的html和js代码;放在<body></body>之间。