This site uses third-party cookies, learn more or accept

CSS powered digital clock

A CSS powered clock
Written by Maxwell Pelic,

Today I made a clock using mostly CSS, with JavaScript powering it by updating the time.

I mainly used the nth-child CSS selector to turn lights on and off depending on the class of the parent div. You can view the full code on the codepen

Previous Article: Websockets and stuff

Next Article: Create 3D text with HTML, CSS, and JavaScript