使用 Swiper 插件制作的《FIFA足球世界》游戏特色图片剪辑的幻灯片展示,左边是游戏背景图,右边是 C 罗踢球的动作图。结合的幻灯片切换效果,使用了 Swiper 的延迟加载功能。
使用方法:
1、head引入css文件
<link rel="stylesheet" href="css/swiper.min.css">
<link rel="stylesheet" href="css/style.css">
2、body引入部分
<div class="bannerbox">
<h2>游戏特色</h2>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img data-src="images/f1_bg.png" class="swiper-lazy" alt="">
<img data-src="images/f1_ren.png" class="swiper-lazy ren" alt="">
</div>
<div class="swiper-slide">
<img data-src="images/f2_bg.png" class="swiper-lazy" alt="">
<img data-src="images/f2_ren.png" class="swiper-lazy ren" alt="">
</div>
<div class="swiper-slide">
<img data-src="images/f3_bg.png" class="swiper-lazy" alt="">
<img data-src="images/f3_ren.png" class="swiper-lazy ren" alt="">
</div>
<div class="swiper-slide">
<img data-src="images/f4_bg.png" class="swiper-lazy" alt="">
<img data-src="images/f4_ren.png" class="swiper-lazy ren" alt="">
</div>
<div class="swiper-slide">
<img data-src="images/f5_bg.png" class="swiper-lazy" alt="">
<img data-src="images/f5_ren.png" class="swiper-lazy ren" alt="">
</div>
</div>
<div class="swiper-pagination"></div>
<span class="swiper-button-next"></span>
<span class="swiper-button-prev"></span>
</div>
</div>
<script src="js/swiper.min.js"></script>
<script src="js/script.js"></script>