123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width" />
- <title>slides</title>
- <link rel="stylesheet" href="../css/flickity.css" />
- <style>
- * { box-sizing: border-box; }
- html { overflow-y: scroll; }
- .carousel {
- border: 1px solid;
- margin-bottom: 40px;
- }
- .flickity-viewport {
- overflow: visible;
- transition: height 0.2s;
- }
- .carousel__cell {
- width: 32%;
- height: 100px;
- background: #BDF;
- margin-left: 1%;
- margin-right: 1%;
- font-size: 40px;
- }
- .carousel__cell.is-selected {
- background: #68F;
- }
- .carousel__cell--height2 { height: 200px; }
- .carousel__cell--height3 { height: 300px; }
- .carousel__cell--height4 { height: 400px; }
- /* ---- ---- */
- .image-carousel img {
- display: block;
- width: 50%;
- }
- </style>
- </head>
- <body>
- <h1>slides</h1>
- <div class="carousel carousel1">
- <div class="carousel__cell carousel__cell--height2">0</div>
- <div class="carousel__cell">1</div>
- <div class="carousel__cell">2</div>
- <div class="carousel__cell carousel__cell--height2">3</div>
- <div class="carousel__cell carousel__cell--height3">4</div>
- <div class="carousel__cell">5</div>
- <div class="carousel__cell carousel__cell--height4">6</div>
- <div class="carousel__cell">7</div>
- <div class="carousel__cell carousel__cell--height3">8</div>
- <div class="carousel__cell">9</div>
- <div class="carousel__cell">10</div>
- </div>
- <div class="carousel image-carousel">
- <img src="http://i.imgur.com/r8p3Xgq.jpg" />
- <img src="http://i.imgur.com/q9zO6tw.jpg" />
- <img src="http://i.imgur.com/bwy74ok.jpg" />
- <img src="http://i.imgur.com/bAZWoqx.jpg" />
- <img src="http://i.imgur.com/PgmEBSB.jpg" />
- <img src="http://i.imgur.com/aboaFoB.jpg" />
- <img src="http://i.imgur.com/LkmcILl.jpg" />
- <img src="http://i.imgur.com/hODreXI.jpg" />
- <img src="http://i.imgur.com/UORFJ3w.jpg" />
- </div>
- <script src="../bower_components/get-size/get-size.js"></script>
- <script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
- <script src="../bower_components/ev-emitter/ev-emitter.js"></script>
- <script src="../bower_components/unipointer/unipointer.js"></script>
- <script src="../bower_components/unidragger/unidragger.js"></script>
- <script src="../bower_components/fizzy-ui-utils/utils.js"></script>
- <script src="../js/cell.js"></script>
- <script src="../js/slide.js"></script>
- <script src="../js/animate.js"></script>
- <script src="../js/flickity.js"></script>
- <script src="../js/drag.js"></script>
- <script src="../js/prev-next-button.js"></script>
- <script src="../js/page-dots.js"></script>
- <script src="../js/player.js"></script>
- <script src="../js/add-remove-cell.js"></script>
- <script src="../js/lazyload.js"></script>
- <script>
- var flkty = new Flickity( '.carousel1', {
- adaptiveHeight: true,
- // groupCells: true,
- // wrapAround: true,
- });
- var imgFlkty = new Flickity( '.image-carousel', {
- adaptiveHeight: true
- });
- window.onload = function() {
- imgFlkty.reposition();
- }
- </script>
- </body>
- </html>
|