Louis Lazaris demonstrates a very simple way of doing this.
Hide the body (with JavaScript) right away with opacity: 0 Wait for all the JavaScript to execute Unhide the body by transitioning it back to opacity: 1
Like this: CodePen…
The post Fading in a Page on Load with CSS & JavaScript appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://www.impressivewebs.com/fading-in-page-on-load-with-css-javascript/
Autentifică-te pentru a adăuga comentarii
Alte posturi din acest grup

Some weekend reading on the heels of Global Accessibility Awareness Day (GAADM), which took place yesterday. The Email Markup Con

Hey, isn't there a fairly new CSS feature that works with scroll regions? Oh yes, that's Scroll-Driven Animations. Shouldn't that mean we can trigger an animation while scrolling through the items


I know, I know: there are a ton of content management system options available, and while I've tested several, none have really been the one, y'know? Weird pricing models, difficult customization,


Okay, nobody is an exaggeration, but have you seen the stats for hwb()
? They show a steep decline, and after working a lot on color in the CSS-Tricks almanac, I’ve just been wondering
