Home > Web Front-end > JS Tutorial > body text

jQuery adaptive carousel plug-in Swiper usage example

高洛峰
Release: 2016-12-27 15:33:58
Original
1705 people have browsed it

The example in this article describes the usage of jQuery adaptive carousel plug-in Swiper. Share it with everyone for your reference, the details are as follows:

The screenshot of the running effect is as follows:

jQuery adaptive carousel plug-in Swiper usage example

The sample code is as follows:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<title>新建H5自适应模板</title>
<link rel="stylesheet" href="swiper-3.3.1.min.css">
<style>
html, body {
  position: relative;
  height: 100%;
}
body {
  background: #eee;
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color:#000;
  margin: 0;
  padding: 0;
}
.swiper-container {
  width: 100%;
  height: 100%;
}
.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
}
</style>
</head>
<body>
<div>
  <div>
    <div><img  src="images/banner01.jpg" alt="jQuery adaptive carousel plug-in Swiper usage example" ></div>
    <div><img  src="images/banner02.jpg" alt="jQuery adaptive carousel plug-in Swiper usage example" ></div>
    <div><img  src="images/banner03.jpg" alt="jQuery adaptive carousel plug-in Swiper usage example" ></div>
  </div>
  <div></div>
</div>
<script src="jquery-1.10.1.min.js"></script>
<script src="swiper-3.3.1.jquery.min.js"></script>
<script>
var swiper = new Swiper(&#39;.swiper-container&#39;, {
  pagination: &#39;.swiper-pagination&#39;,
  paginationClickable: true
});
</script>
</body>
</html>
Copy after login

I hope this article will be helpful The above will be helpful to everyone in jQuery programming.

For more jQuery adaptive carousel plug-in Swiper usage examples and related articles, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!