slider.page.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <ion-header [translucent]="true">
  2. <ion-toolbar>
  3. <ion-title>轮播图Slider Swiper.js</ion-title>
  4. </ion-toolbar>
  5. </ion-header>
  6. <ion-content [fullscreen]="true">
  7. <ion-header collapse="condense">
  8. <ion-toolbar>
  9. <ion-title size="large">slider</ion-title>
  10. </ion-toolbar>
  11. </ion-header>
  12. <!-- Swiper轮播图 手动创建 -->
  13. <!-- Slider main container -->
  14. <button (click)="slide1?.slideNext()">next</button>
  15. <div #slide1Comp class="swiper">
  16. <!-- Additional required wrapper -->
  17. <div class="swiper-wrapper">
  18. <!-- Slides -->
  19. <div class="swiper-slide">Slide 1</div>
  20. <div class="swiper-slide">Slide 2</div>
  21. <div class="swiper-slide">Slide 3</div>
  22. </div>
  23. <!-- If we need pagination -->
  24. <div class="swiper-pagination"></div>
  25. <!-- If we need navigation buttons -->
  26. <div class="swiper-button-prev"></div>
  27. <div class="swiper-button-next"></div>
  28. <!-- If we need scrollbar -->
  29. <div class="swiper-scrollbar"></div>
  30. </div>
  31. </ion-content>