缩略图跟随的焦点图
左右箭头,缩略图会跟随移动,缩略图始终在列表第一个位置
XML/HTML Code
- <div class="container">
- <div class="albery-container">
- <div class="albery-wrapper">
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=655" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=656" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=657" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=658" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=659" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=660" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=661" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=662" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=663" alt=""> </div>
- <div class="albery-item"> <img src="https://picsum.photos/1000/666?image=664" alt=""> </div>
- </div>
- <div class="move-right"> <a href="#" id="rightArrow">▶</a> </div>
- <div class="move-left"> <a href="#" id="leftArrow">◀</a> </div>
- </div>
- <div class="pagination-container">
- <div class="pagination-wrapper">
- <div class="pagination-item" data-item="1"> <img src="https://picsum.photos/116/77?image=655" alt=""> </div>
- <div class="pagination-item" data-item="2"> <img src="https://picsum.photos/116/77?image=656" alt=""> </div>
- <div class="pagination-item" data-item="3"> <img src="https://picsum.photos/116/77?image=657" alt=""> </div>
- <div class="pagination-item" data-item="4"> <img src="https://picsum.photos/116/77?image=658" alt=""> </div>
- <div class="pagination-item" data-item="5"> <img src="https://picsum.photos/116/77?image=659" alt=""> </div>
- <div class="pagination-item" data-item="6"> <img src="https://picsum.photos/116/77?image=660" alt=""> </div>
- <div class="pagination-item" data-item="7"> <img src="https://picsum.photos/116/77?image=661" alt=""> </div>
- <div class="pagination-item" data-item="8"> <img src="https://picsum.photos/116/77?image=662" alt=""> </div>
- <div class="pagination-item" data-item="9"> <img src="https://picsum.photos/116/77?image=663" alt=""> </div>
- <div class="pagination-item" data-item="10"> <img src="https://picsum.photos/116/77?image=664" alt=""> </div>
- </div>
- </div>
- </div>
原文地址:http://www.freejs.net/article_jiaodiantu_710.html