線上書籍

Home

數位相簿很上手

  1. 下載套件:https://github.com/webugm/gallery/raw/master/lightgallery.zip
  2. 安裝 <!-- lightgallery css --> <link rel="stylesheet" type="text/css" href="lightgallery/css/lightgallery.min.css"> <!-- lightgallery js --> <script src="lightgallery/js/picturefill.min.js"></script> <script src="lightgallery/js/lightgallery-all.min.js"></script> <script src="lightgallery/js/jquery.mousewheel.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#lightgallery').lightGallery(); }); </script>

     

  3. 在包裝增加 「id="lightgallery"」
  4. 在項目增加「data-src="img/img01.jpg" data-sub-html="<h4>標題1</h4><p>內容1</p>"」