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/
Login to add comment
Other posts in this group

Today, I want to discuss a couple of patterns for naming color palettes that the community is using, and how I propose we can improve, so we achieve both flexibility and beauty.


I went on to figure out how make masonry work today with other browsers. I'm happy to report I've found a way — and, bonus! — that support can be provided with only 66 lines of JavaScript.
<hr


Brad Frost introduced the “Atomic Design” concept wayyyy back in 2013. He even

Chrome 139 is experimenting with Open UI’s proposed Interest Invoker API, which would be used to create tooltips, hover menus, hover cards, quick actions, and other types of UIs for showing more in

Focus trapping is about managing focus within an element, such that focus always stays within it. The whole process sounds simple in theory, but it can quite difficult to build in practice, mostly