DEV Community

Tanner Dolby
Tanner Dolby

Posted on

Window illustration - CSS

An interactive css art window that displays two backgrounds, day and night. Based on this dribble shot:

Top comments (2)

maroun_baydoun profile image
Maroun Baydoun

This looks amazing! Great job.

A small tip to simplify your JavaScript would be using document.querySelector to select DOM elements. Using this method, you will have access to the first (and only in this case) DOM element matching the selector.

tannerdolby profile image
Tanner Dolby

Thank you Maroun!

Yeah I agree with you. Using document.querySelector() to select elements from the DOM is much better practice.