the previous answer works in most cases, but if for some reason the speed.js function is disabled, your body will retain its opacity to 0, and your content will not be shown. The following rules avoid this problem:
.pace-running > :not(.pace) { opacity: 0; } .pace-done > :not(.pace) { opacity: 1; transition: opacity .5s ease; }
Then, it's up to you to add prefixes or pseudo-classes ...
NicolasGraph
source share