Google's Material Design new spinner done with CSS and SVG (codepen.io)
almost 9 years ago from Fran Pérez, Designer at Google
almost 9 years ago from Fran Pérez, Designer at Google
Clever use of transitions, nice work. For those that didn't read the code, here's a breakdown of how it was done:
stroke-dashoffset
to be 360 / 2 + 7 (where 7 appears to be random).stroke-dashoffset
by n. b: Changes the color.The tricky part is understanding how the stroke-dashoffset
property works. Try changing the $offset
value to 180, 90, 45 and 0 respectively to visualize the changes. More information on stroke-dashoffset
here -- https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset
Awesome! It's not rendering properly on Firefox though.
Designer News
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.
Have feedback?
Login to Comment
You'll need to log in before you can leave a comment.
LoginRegister Today
New accounts can leave comments immediately, and gain full permissions after one week.
Register now