-
Notifications
You must be signed in to change notification settings - Fork 4
Usage
Alex edited this page Nov 28, 2016
·
2 revisions
Make sure you are using either jQuery or Zepto. Swiper.js expects your slider container to have certain CSS properties. You can also check out this example.
HTML
<div id="Pages">
<ul class="container">
<li class="page">1</li>
<li class="page">2</li>
<li class="page">3</li>
</ul>
</div>
CSS
<style>
html, body { width: 100%; height: 100%; }
#Pages { width: 100%; height: 100%; overflow: hidden; }
#Pages .container,
#Pages .page { float: left; width: 100%; height: 100%; background: #f3f3f3; }
#Pages .page { list-style: none; }
</style>
Javascript
<script>
var s = new Swiper('#Pages', options);
</script>