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

CSS powered digital clock

Written by Max Pelic on

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

Share this article:

Previous Article: Websockets and stuff

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