1.swiper插件实现轮播图
swiper是一个实现轮播图很强大,上手也容易。并且也是现在app,网址等用的最多的,
官方网址:http://www.swiper.com.cn/
下载插件导入,按照教程即可实现精美效果
代码部分
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="swiper-3.4.1.min.css">
<script type="text/javascript" src="jquery/jquery-3.0.0.min.js"></script>
<script type="text/javascript" src="swiper-3.4.1.jquery.min.js"></script>
<style type="text/css">
.swiper-container{
790px;
height: 340px;
}
</style>
</head>
<!-- 结构以及class的类名不允许更改 -->
<body>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">![]((1).jpg)</div>
<div class="swiper-slide">![]((2).jpg)</div>
<div class="swiper-slide">![]((3).jpg)</div>
<div class="swiper-slide">![]((4).jpg)</div>
<div class="swiper-slide">![]((5).jpg)</div>
<div class="swiper-slide">![]((6).jpg)</div>
<div class="swiper-slide">![]((7).jpg)</div>
<div class="swiper-slide">![]((8).jpg)</div>
</div>
<!-- 如果需要分页器 -->
<div class="swiper-pagination">