简体   繁体   中英

How can I create this spinning wheel effect?

I would like to re-create the following spinning-wheel effect in JS. Does anyone know what's used here or how I could achieve it?

https://www.outpan.com/app/ddd2faecf3/random-picker

If you inspect the source of your example, notice the style:

<canvas id="canvas" width="300" height="300" style="transform: rotate(3357deg);"></canvas>

Transform in CSS allows you to rotate an element. Apply it dynamically to induce the effect upon user interaction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM