A Pen by Dave DeSandro on CodePen.
Created
December 29, 2022 11:50
-
-
Save itssagarfiverr/c7924751d5b72a6a5f489b2b0342ab66 to your computer and use it in GitHub Desktop.
Flickity - groupCells
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>Flickity - groupCells</h1> | |
| <!-- Flickity HTML init --> | |
| <div class="carousel" data-flickity='{ "groupCells": true }'> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| <div class="carousel-cell"></div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // external js: flickity.pkgd.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://npmcdn.com/flickity@2/dist/flickity.pkgd.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* external css: flickity.css */ | |
| * { box-sizing: border-box; } | |
| body { font-family: sans-serif; } | |
| .carousel { | |
| background: #EEE; | |
| } | |
| .carousel-cell { | |
| width: 28%; | |
| height: 200px; | |
| margin-right: 10px; | |
| background: #8C8; | |
| border-radius: 5px; | |
| counter-increment: carousel-cell; | |
| } | |
| .carousel-cell.is-selected { | |
| background: #ED2; | |
| } | |
| /* cell number */ | |
| .carousel-cell:before { | |
| display: block; | |
| text-align: center; | |
| content: counter(carousel-cell); | |
| line-height: 200px; | |
| font-size: 80px; | |
| color: white; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href="https://npmcdn.com/flickity@2/dist/flickity.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment