DEV Community

Cover image for CSS Light Saber

Posted on

CSS Light Saber

Inspired by lynn fisher and this live streaming video with her,
I created:

Single div Lightsaber

In CSS, there are three layers: the selector, :before, and :after.
In this case the “div” holds the blade, the :before holds the hilt and the :after holds the button.
The drawing was made with color-gradients inside a background-image.

Top comments (1)

danielbellmas profile image
Daniel Bellmas