Preloader w/ JS

Hello, I'm trying to create a preload transition for each time a page is loaded. Here's my code: https://codepen.io/Matt-CopOffMatt/pen/NWJKmbK However, when adding the .hidden class, it doesn't seem to transition as I expected (fade to 0). I thought by adding an element and having transition with css, it would fade out. Does anyone know what I'm doing wrong? Also, is this the proper way to create a 'preloader'? Thank you!
2 Replies
glutonium
glutonium11mo ago
Stack Overflow
CSS transition with visibility not working
In the fiddle below, I've a transition on visibility and opacity separately. The latter works but the former doesn't. Moreover, in case of visibility, the transition time is interpreted as delay on...
Matt
Matt11mo ago
Thanks
Want results from more Discord servers?
Add your server