128Pivoting card disk
In this effect, we flip double-sided cards around a central hinge, like the pages of a book we can turn forever. A click brings one side to the front, and a drag turns the pages as the pointer travels. Ready? Let’s go!
HTML Structure
The structure is relatively simple. Two short lines sit on either side, and a stage holds the disk:
<section class="mwg_effect128">
<div class="texts">
<p class="text">Every flip reveals</p>
<p class="text">something new</p>
</div>
<div class="stage">
<div class="disk">
...
</div>
</div>
</section>
The disk collapses to a single point. Every card will pivot around that point:
<div class="disk">
<div class="card">
<div class="face recto">
<img src="./assets/medias/01.webp" alt="" draggable="false">
</div>
<div class="face verso">
<img src="./assets/medias/07.webp" alt="" draggable="false">
</div>
</div>
...
</div>
Each card needs a front and a back. recto is the side we see before the flip, and verso is the side that comes around once the card has passed the hinge.
We can add as many cards as we like. The script will space them around the same pivot.
Get started with free effects
Get a taste of what’s possible with Made With Gsap, completely free
Try it nowNo credit card or account required.
Free for everyone.