Created
May 18, 2019 01:15
-
-
Save adamrosloniec/6bb75b4313453d8d3232cbd0301fa675 to your computer and use it in GitHub Desktop.
Easiest way to add fade in effect after Page Load
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add in head section - for fastest loading, before scripts and styles. | |
<style type="text/css">body{overflow:hidden;pointer-events:none;opacity:0;transition:opacity 2s;-webkit-transition:opacity 2s;}</style> | |
<script type="text/javascript">window.onload=function(){document.body.setAttribute("style","overflow:initial;opacity:1;pointer-events:initial;");}</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment