My attempt at creating a loader animation was inspired by this design on dribbble: . After looking at the comments, I came across a CodePen with a similar animation, but it was all done in JavaScript: https://codepen.io/AbubakerSaeed/full/yLaQVdq
tl2
.set(".dC-1", { rotate: 0 })
.set(".dC-2", { rotate: 30 })
.set(".dC-3", { rotate: 60 })
.set(".dC-4", { rotate: 90 })
.set(".dC-5", { rotate: 120 })
.set(".dC-6", { rotate: 150 })
.set(".dC-7", { rotate: 180 })
.set(".dC-8", { rotate: 210 })
.set(".dC-9", { rotate: 240 })
.set(".dC-10", { rotate: 270 })
.set(".dC-11", { rotate: 300 })
.set(".dC-12", { rotate: 330 })
.to(".dC-1", {
delay: s,
duration: s,
rotate: 30,
})
I attempted to convert this animation into pure CSS but struggling to understand how to do it. Could someone guide me on how to create these two timelines in SCSS and translate the JavaScript code into SCSS?