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: https://dribbble.com/shots/11283947-Taking-it-slow

Top comments (2)

Collapse
 
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.

Collapse
 
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.