DEV Community

loading...

#CodepenChallenge Tree: CSS Only Rotating Christmas Tree

takaneichinose profile image Takane Ichinose ・1 min read

Maybe a little late for Christmas Tree, but not yet for this week's challenge. This is a flat-style designed (or maybe pseudo-3D) Christmas Tree that's rotating depending on where your mouse pointer is.

Most of the technique that I used in rotation is CSS (and HTML) loop.

I also took advantage of CSS variables to make the CSS source code shorter, but maybe, I could say dynamic (in terms of adding an object, or redesigning).

Discussion

pic
Editor guide